LinePlot.AddVar

Prototypes

void AddVar( String sVarName )

Parameters

String sVarName
The name of the variable in the associated DataObject you want to add to the plot as a new Y axis variable.

Remarks

This method adds a new variable to the Y axis of the plot.

This method cannot be used with line plots that 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" );
plot.AddVar( "Y2" );
plot.AddVar( "Y3" );
See Also

DataObject.AddVar