CreatePlotMatrix

Prototype

void CreatePlotMatrix( DataObject dobj, Matrix mVarNames )

Parameters

DataObject dobj
The DataObject containing the variables to be plotted.

Matrix mVarNames
A character vector containing the names of the variables to be plotted.

Remarks

This module creates N*(N+1)/2 plots, where N is the number of variables in the mVarNames vector. The module internally sorts the vector mVarNames so all nominal variables appear before all interval variables. The module then creates a lower-triangular matrix of plots that show the pairwise relationships between the variables.

If you want to access the plots after the module returns, you can access the array of plots via the global variable __CreatePlotMatrix. This variable is a Java array of objects of the Plot class. Before referring to this variable, you must include the following declaration:

declare Plot[] __CreatePlotMatrix;

The N*(N+1)/2 plots are stored in the array in column-major order. Note that because Java arrays use zero-based indexing, the first plot is accessed as __CreatePlotMatrix[0].

Example
declare DataObject dobj;
dobj = DataObject.CreateFromFile( "baseball" );

declare Plot[] __CreatePlotMatrix;

varNames = { "League" "No_AtBat" "No_Hits" "No_RBI" };
run CreatePlotMatrix( dobj, varNames );

/* You can directly access methods in the Plot class...*/
__CreatePlotMatrix[0].DrawText( 50, 60, "(Nominal Variable)" );

/* ...or assign the plot to access sub-class methods. */
declare BoxPlot box;
box = __CreatePlotMatrix[2];
box.ShowSerifs();
See Also

CreateFullScatterMatrix