LinePlot.SetLineStyle

Prototypes

void SetLineStyle( <String sVarName,> int nStyle )

void SetLineStyle( <int nLineNum,> int nStyle )

void SetLineStyle( <Matrix mLineSpec,> int nStyle )

Parameters

int nStyle
A predefined constant specifying the desired line style. The valid values are SOLID, DASHED, DOTTED, DASHDOT, and DASHDOTDOT.

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 style 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.SetLineStyle( "Y2", DOTTED );
plot.ShowWindow();
See Also

LinePlot.SetLineAttributes
LinePlot.SetLineColor
LinePlot.SetLineMarkerShape
LinePlot.SetLineWidth