XYZPlot STATBEAN®


Purpose: The XYZ plotter displays a scatterplot or line plot for three numeric columns. It allows Statgraphics to function as an XYZ graph generator.

XYZ Graph Generator DataSource: any. 

xyzplotexample

XYZ Graph Generator Read/Write Properties

Name Type Description Possible Values Default Value
connected boolean Whether the points should be connected with a line. true,false false
forceEqualScales boolean Whether to force the x-axis and y-axis scaling to be the same. true,false false
horizontalViewAngle int Angle from which plot is viewed in degrees. Any integer. 20
points boolean Whether point symbols should be plotted. true,false true
threeDReferenceLine String Type of reference lines, if any, to be added to the plot. "None",
"Bottom",
"Top",
"Front",
"Back",
"Left",
"Right"
"None"
threeDReferenceLineColor Color Color for drawing the reference line. Any valid color. Color.black
suppressXaxis boolean Whether to suppress display of the x-axis scaling and ticmarks. true,false false
suppressYaxis boolean Whether to suppress display of the y-axis scaling and ticmarks. true,false false
suppressZaxis boolean Whether to suppress display of the z-axis scaling and ticmarks. true,false false
tablewiseExclusion boolean Whether all rows of the data table containing a missing value in any column should be excluded from the plot. true,false false
verticalViewAngle int Angle from which plot is viewed in degrees. Any integer. 20
xVariableName String The name of the column with data values to be plotted on the X axis. Any string. "X"
yVariableName String The name of the column with data values to be plotted on the Y axis. Any string. "Y"
zVariableName String The name of the column with data values to be plotted on the Z axis. Any string. "Z"
 

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

XYZ Graph Generator 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"); 

//set the delimiter character used in the file 
fileDataSource1.setDelimiter("tab"); 

//create a plot bean 
XYZPlot xYZPlot1 = new STATBEANS.XYZPlot(); 

//set the columns for the x and y axes 
xYZPlot1.setZVariableName("mpg"); 
xYZPlot1.setXVariableName("weight"); 
xYZPlot1.setYVariableName("horsepower"); 

//add reference lines 
xYZPlot1.setThreeDReferenceLine("Bottom"); 

//override the top title 
xYZPlot1.setTopTitleLine1("Plot of Automobile Data"); 

//turn on point identifcation 
xYZPlot1.setHighlightPointOnMouseClick(true); 
xYZPlot1.setShowPointClickedMessage(true); 

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

//instruct the fileDataSource bean to read the file