| Contents | Index |
LineColorType selects the type of line coloring used.
|
Attribute |
Type |
Value |
See Also:
FillColorType, LineColor, LineColor2, LineColorFunction
Details:
LineColorType controls the type of line coloring used. With the exception of Flat and Functional, the coloring schemes depend on the height, i.e., the
or
value (in 2D or 3D, respectively) of points on the line, relative to the extension of the viewing box.
By default, lines are drawn in the color set by the attribute LineColor. This caused by the setting LineColorType = Flat. The other possible values for LineColorType mean:
Dichromatic
The color of a point on a line depends on its height, with the lowest point using LineColor2, the highest one using LineColor, and all other points using a linear interpolation in RGB color space.
Flat
The line is drawn with LineColor. No blend is used.
Monochrome
The line is drawn with a blend from LineColor to a dimmed version of LineColor.
Rainbow
This setting is technically similar to Dichromatic, but the effect is vastly different, since interpolation takes place in HSV color space. This creates a “rainbow effect”, which mostly conforms with a physical rainbow for suitable choices of colors.
Functional
Both LineColor and LineColor2 are ignored; the color scheme is derived from LineColorFunction. See ?LineColorFunction for details (which depend on the object type). If no color function is given, the object will be rendered with LineColorType = Flat.
Example 1
By default, lines are drawn in one flat color:
plotfunc2d(sin(x))

plot(plot::Polygon2d([[-1,-1], [1,-1], [1,1], [-1,1]],
Closed = TRUE, Filled = FALSE))

Example 2
Using LineColorType = Dichromatic, Monochrome, or Rainbow causes a height-dependent color effect:
plotfunc2d(sin(x), LineColorType = Rainbow)

Note that height coloring depends on the height of the whole scene, not only on that of individual objects:
plot(
plot::Function2d(sin(x) + 0.2, LineColorType = Dichromatic),
plot::Function2d(sin(x) + 0.0, LineColorType = Monochrome),
plot::Function2d(sin(x) - 0.2, LineColorType = Rainbow),
LineColor = RGB::Red, LineColor2 = RGB::Blue
)


Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |