StatBean Name: DraftsmansPlot

Purpose: - displays a top, front and side view of a 3D scatterplot.

DataSource: Any.


Read/Write Properties
NameTypeDescriptionPossible ValuesDefault Value
gapdoubleThe proportion of the plotting space left blank around each side of the cells of the plot.0.0-0.250.1
missingValueExclusionStringThe method for handling records which contain missing values."Columnwise","Casewise",
"Tablewise"
"Columnwise"
smootherColorColorColor for drawing the smooth.Any valid color.Color.blue
smootherPercentageintWidth of the smoother as a percentage of the number of observations.1-9950
smootherTypeStringType of smoother, if any, to be added to the plot."None",
"Running Means",
"Running Lines",
"LOWESS",
"Robust LOWESS"
"None"
xVariableNameStringThe name of the column with data values to be plotted on the X axis.Any string."X"
yVariableNameStringThe name of the column with data values to be plotted on the Y axis.Any string."Y"
zVariableNameStringThe name of the column with data values to be plotted on the Z axis.Any string."Z"

Other properties are inherited from the java.awt.Canvas class and from the general GraphicalStatbean class.

Code Sample

//create a datasource bean
FileDataSource fileDataSource1 = new STATBEANS.FileDataSource();

//set the file name to be read
fileDataSource1.setFileName("c:\\statbeans\\samples\\cardata.txt");

//create a plot bean
DraftsmansPlot draftsmansPlot1 = new STATBEANS.DraftsmansPlot();

//set the columns names
draftsmansPlot1.setXVariableName("weight");
draftsmansPlot1.setYVariableName("horsepower");
draftsmansPlot1.setZVariableName("mpg");

//set smoother type
draftsmansPlot1.setSmootherType("Robust Lowess");

//add plot
add(draftsmansPlot1);

//make the plot a listener for changes in the FileDataSource bean
fileDataSource1.addDataChangeListener(draftsmansPlot1.listenerForDataChange);

//instruct the fileDataSource bean to read the file
fileDataSource1.readData();