LinePlot.SetLineAttributes

Prototypes

void SetLineAttributes( <String sVarName,> int nColor, int nStyle, int nWidth )

void SetLineAttributes( <int nLineNum,> int nColor, int nStyle, int nWidth )

void SetLineAttributes( <Matrix mLineSpec,> int nColor, int nStyle, int nWidth )

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 nStyle
A predefined constant specifying the desired line style. The valid values are SOLID, DASHED, DOTTED, DASHDOT, and DASHDOTDOT.

int nWidth
The width of the line.

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, style, and width 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.SetLineAttributes( "Y2", RED, DOTTED, 3 );
plot.ShowWindow();
See Also

LinePlot.SetLineColor
LinePlot.SetLineStyle
LinePlot.SetLineWidth