LinePlot.SetLineColor

Prototypes

void SetLineColor( <String sVarName,> int nColor )

void SetLineColor( <String sVarName,> int nRed, int nGreen, int nBlue )

void SetLineColor( <int nLineNum,> int nColor )

void SetLineColor( <int nLineNum,> int nRed, int nGreen, int nBlue )

void SetLineColor( <Matrix mLineSpec,> int nColor )

void SetLineColor( <Matrix mLineSpec,> int nRed, int nGreen, int nBlue )

Parameters

int nColor
A predefined constant specifying the desired color. The valid values are BLACK, BLUE, BROWN, CHARCOAL, CREAM, CYAN, GOLD, GRAY, GREY, GREEN, LILAC, LIME, MAGENTA, MAROON, OLIVE, ORANGE, PINK, PURPLE, RED, ROSE, SALMON, STEEL, TAN, VIOLET, WHITE, and YELLOW.

int nRed, nGreen, nBlue
An RGB specification of the desired color. Each parameter must be an integer in the range [0, 255]. Examples: the triplet (0, 0, 0) represents black; the triplet (255, 255, 255) represents white.

String sVarName
The name of the Y axis variable whose line you want to affect.

int nLineNum
The number (1-based) of the line you want to affect.

Matrix mLineSpec
If mLineSpec is a numeric matrix, the first element specifies the number (1-based) of the line you want to affect. If mLineSpec is a character matrix, the first element specifies the name of the Y axis variable whose line you want to affect.

Remarks

This method changes the color of lines in a line plot. If you do not specify sVarName, nLineNum, or mLineSpec, the method acts on all lines in the plot.

The versions of this method that accept a Y axis variable name can only be used with line plots that do not use group variables.

Example
x  = { 1, 2, 3, 4, 5, 6, 7, 8 };
y1 = { 1, 2, 3, 4, 5, 6, 7, 8 };
y2 = { 2, 3, 4, 5, 6, 7, 8, 9 };
y3 = { 3, 4, 5, 6, 7, 8, 9, 10 };
declare DataObject dobj = DataObject.Create( "Sample Data" );
dobj.AddVar( "X", "X", x );
dobj.AddVar( "Y1", "Y1", y1 );
dobj.AddVar( "Y2", "Y2", y2 );
dobj.AddVar( "Y3", "Y3", y3 );
declare LinePlot plot = LinePlot.Create( dobj, "X", "Y1", false );
plot.AddVar( "Y2" );
plot.AddVar( "Y3" );
plot.SetLineColor( "Y2", RED );
plot.ShowWindow();
See Also

LinePlot.SetLineAttributes
LinePlot.SetLineMarkerShape
LinePlot.SetLineStyle
LinePlot.SetLineWidth