Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Color

Value Summary

Library wrapper for "Colors, FillColor, LightColor, LineColor, and PointColor"See below

Description

Color refers to the "main color" of an object.

Depending on the object type, Color refers to the line color (e.g., plot::Function2d), the fill color (plot::Surface), the point color (plot::Point2d), the light color (plot::PointLight), or the one-and-only entry in Colors (plot::Histogram2d).

In general, the main color of an object is the first one available in the list

  1. The first entry of Colors, if Colors contains exactly one entry.

  2. FillColor

  3. LineColor

  4. PointColor

  5. LightColor

The following object types deviate from this general rule and choose the line color as main color: plot::Arc2d, plot::Arc3d, plot::Circle2d, plot::Circle3d, plot::Ellipse2d, plot::Ellipse3d, plot::Ode2d, plot::Ode3d, plot::Parallelogram2d, plot::Polygon2d, plot::Polygon3d, and plot::Rectangle. plot::Sequence uses PointColor as the main color.

    Note:   Color is a library attribute and does not appear in the inspector.

Examples

Example 1

Color is useful for unified input of different object types:

plot(plot::Function3d(sin(x-y/2), Color = RGB::Green),
     plot::Point3d([0, 0, 0], Color = RGB::Red),
     plot::Curve3d([x, 0, sin(x)], x = -6..6,
                   LineWidth = 2*unit::mm,
                   Color = RGB::Blue),
     Scaling = Constrained)

See Also

MuPAD Functions

Was this topic helpful?