Skip to Main Content Skip to Search
Product Documentation

LineColorcolor of lines

LineColor2color of lines

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.

→ Examples

Attribute

Type

Value

See Also:

AxesLineColor, LineColorFunction, LineColorType, LineStyle, LinesVisible, LineWidth

Details:

Example 1

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)):

MuPAD graphics

Example 2

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)):

MuPAD graphics

Example 3

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

[0.0, 0.0, 1.0]

p::LineColor

[0.0, 0.0, 1.0]

delete p:

Example 4

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])):

MuPAD graphics

  


Recommended Products

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