MosaicPlot.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 X variable.

Remarks

This method adds a new X variable to the mosaic plot.

Example
vehicles = { "car"   "new" "blue",
             "car"   "new" "red",
             "car"   "new" "red",
             "car"   "old" "blue",
             "car"   "old" "blue",
             "car"   "old" "blue",
             "car"   "old" "red",
             "truck" "new" "blue",
             "truck" "new" "red",
             "truck" "old" "blue",
             "truck" "old" "red",
             "truck" "old" "red" };
declare DataObject dobj = DataObject.Create( "Vehicles" );
dobj.AddVars( {"vehicle" "age" "color"}, vehicles );
declare MosaicPlot plot;
plot = MosaicPlot.Create( dobj, "age", "vehicle" );
run DoMessageBoxOK( "Sample", "Click OK to add another X variable" );
plot.AddVar( "color" );
See Also

DataObject.AddVar