MosaicPlot.Create

Prototypes

static MosaicPlot Create( DataObject dobj, Matrix mXVarNames, String sYVarName <, boolean bShow> )

static MosaicPlot Create( String sDataName, Matrix mX, Matrix mY <, boolean bShow> )

Return Value

The return value is a reference to the newly created MosaicPlot object.

Parameters

DataObject dobj
The DataObject containing the variables you want to plot.

Matrix mXVarNames
A vector containing the names of the variables to assign to the X axis.

String sYVarName
The name of the variable to assign to the Y axis.

boolean bShow
If bShow is true, the plot's window is displayed. If bShow is false, the plot's window is hidden. Calling this method without specifying bShow is equivalent to calling it with bShow equal to true.

String sDataName
The name to assign to the DataObject created internally by this method.

Matrix mX
A matrix containing data for the X axis. The values in each column define a grouping of the data in the mY matrix. The mX matrix is used to create a DataObject and then that DataObject is used to create a MosaicPlot.

Matrix mY
A vector containing data for the Y axis. This vector is added to the same DataObject as the mX vector.

Remarks

This method creates a mosaic plot.

Example
vehicle = { "car", "truck", "car", "car", "truck", "van", "motorcycle" };
age = { "new", "new", "old", "new", "old", "old", "new" };
declare DataObject dobj = DataObject.Create( "Vehicles" );
dobj.AddVar( "vehicle", "Vehicle", vehicle );
dobj.AddVar( "age", "Age", age );
MosaicPlot.Create( dobj, "vehicle", "age" );
See Also

MosaicPlot.CreateWithFreq