ScatterplotMatrix STATBEAN®

 

Purpose: - create a scatter plot graph matrix of 2-variables for several numeric columns.

Scatter Plot Matrix: Any. 

scatterplotmatrix


Scatter Plot Matrix Read/Write Properties
Name Type Description Possible Values Default Value
columnNames String array The names of the columns to be plotted. One or more strings. {""}
gap double The proportion of the plotting space left blank around each side of the cells of the plot. 0.0-0.25 0.1
labelColor Color The color of the variable labels. Any valid Color. Color.black
labelFont Font The font to be used for the variable labels. Any Font. "Serif",0,12
missingValueExclusion String The method for handling records which contain missing values. "Columnwise","Casewise",
"Tablewise"
"Columnwise"
smootherColor Color Color for drawing the smooth. Any valid color. Color.blue
smootherPercentage int Width of the smoother as a percentage of the number of observations. 1-99 50
smootherType String Type of smoother, if any, to be added to the plot. "None",
"Running Means",
"Running Lines",
"LOWESS",
"Robust LOWESS"
"None"

Other properties needed to create a scatter plot graph are inherited from the java.awt.Canvas class and from the general GraphicalStatbean class. 

Scatter Plot Matrix 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 
ScatterplotMatrix scatterplotMatrix1 = new STATBEANS.ScatterplotMatrix(); 

//set the columns names 
String[] temp = new String[4]; 
temp[0] = "mpg"; 
temp[1] = "horsepower"; 
temp[2] = "displace"; 
temp[3] = "weight"; 
scatterplotMatrix1.setColumnNames(temp); 

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

//add plot 
add(scatterplotMatrix1);