Color of lines
|plot::Bars2d, plot::Histogram2d, plot::Piechart2d|
|plot::Cylindrical, plot::Dodecahedron, plot::Function3d, plot::Hexahedron, plot::Icosahedron, plot::Matrixplot, plot::Octahedron, plot::Prism, plot::Pyramid, plot::Spherical, plot::Surface, plot::SurfaceSet, plot::SurfaceSTL, plot::Sweep, plot::Tetrahedron, plot::Tube, plot::XRotate, plot::ZRotate|
|plot::Arc2d, plot::Arrow2d, plot::Arrow3d, plot::Circle2d, plot::Circle3d, plot::Density, plot::Ellipse2d, plot::Inequality, plot::Line2d, plot::Line3d, plot::Lsys, plot::Parallelogram2d, plot::Raster, plot::Rectangle, plot::Rootlocus, plot::Turtle|
|plot::Arc3d, plot::Conformal, plot::Curve2d, plot::Curve3d, plot::Ellipse3d, plot::Function2d, plot::Implicit2d, plot::Listplot, plot::Polar, plot::Polygon2d, plot::Polygon3d, plot::Sequence, plot::Sum, plot::VectorField2d, plot::VectorField3d|
|plot::Bars3d, plot::Box, plot::Cone, plot::Cylinder, plot::Parallelogram3d, plot::Piechart3d, plot::Plane|
LineColor sets the color of line objects such as 2D function graphs, curves in 2D and 3D, parameter lines on surfaces etc.
LineColor2 is a secondary color used for color blends.
For surface objects such as 3D function graphs, surfaces etc., however, the attribute Color sets the FillColor. If you wish to change the color of the parameter lines on a surface, you have to use LineColor.
The RGB color set by LineColor cannot be animated. However, setting LineColorType = Functional, you can define a LineColorFunction that overrides the color set by LineColor. The line color function accepts an animation parameter, thus allowing to implement animated coloring of lines. See the help page of LineColorFunction for further details.
When the attribute LineColorType is set to one of the values Dichromatic or Rainbow, many line objects react to a secondary color set by the attribute LineColor2.
A gradient between the colors defined by LineColor and LineColor2 is created.
The color of the coordinate axes is set by the attribute AxesLineColor.
We draw arrows of different colors:
plot(plot::Arrow2d([0, 0], [1, 2], LineColor = RGB::Red), plot::Arrow2d([0, 0], [1, 1], LineColor = RGB::Green), plot::Arrow2d([0, 0], [2, 1], LineColor = RGB::Blue)):
We draw a parabola with a gradient between green and blue:
plot(plot::Function2d(x^2, x = 1..10, LineColorType = Dichromatic, LineColor = RGB::Green, LineColor2 = RGB::Blue)):
As with any attribute, the line color can be read and changed using the ::-notation:
p := plot::Line2d([1, 2], [4, 5]): p::LineColor := RGB::Blue
For surface objects such as 3D function graphs, LineColor sets the color of the parameter lines on the surface. Here, a semi-transparent RGBa color is chosen that gives only a faint indication of these lines:
plot(plot::Function3d(x^2 + y^2, x = -1..1, y = -1 ..1, LineColor = RGB::Green.[0.25])):