Documentation Center

  • Trial Software
  • Product Updates

Color

Value Summary

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

Graphics Primitives

ObjectsColor Default Values
plot::Histogram2dRGB::GeraniumLake
plot::Cylindrical, plot::Density, plot::Dodecahedron, plot::Function3d, plot::Hatch, plot::Hexahedron, plot::Icosahedron, plot::Implicit3d, plot::Matrixplot, plot::Octahedron, plot::Prism, plot::Pyramid, plot::Spherical, plot::Surface, plot::SurfaceSet, plot::SurfaceSTL, plot::Tetrahedron, plot::XRotate, plot::ZRotateRGB::Red
plot::Box, plot::Cone, plot::Ellipsoid, plot::Parallelogram3d, plot::Plane, plot::SphereRGB::LightBlue
plot::Arrow2d, plot::Arrow3d, plot::Circle2d, plot::Circle3d, plot::Conformal, plot::Curve2d, plot::Curve3d, plot::Ellipse2d, plot::Function2d, plot::Implicit2d, plot::Line2d, plot::Line3d, plot::Lsys, plot::Parallelogram2d, plot::Polar, plot::Polygon2d, plot::Polygon3d, plot::Raster, plot::Rectangle, plot::Sequence, plot::Sum, plot::Turtle, plot::VectorField2d, plot::VectorField3dRGB::Blue
plot::Point2d, plot::Point3d, plot::PointList2d, plot::PointList3d, plot::SparseMatrixplotRGB::MidnightBlue
plot::SweepRGB::Black.[0.25]
plot::IterationRGB::Grey50
plot::Bars2d, plot::Bars3d, plot::Boxplot, plot::Piechart2d, plot::Piechart3d 
plot::WatermanRGB::SafetyOrange
plot::IntegralRGB::PaleBlue

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?