StemLeafDisplay STATBEAN®

 

Purpose: Creates a stem-and-leaf display for a single column of numeric data. Allows Statgraphics to function as a stem-and-leaf plot generator.

DataSource: Any. 

stemleafdisplay

Read/Write Properties:

Name Type Description Possible Values Default Value
depthCounts boolean Whether to add depth counts on the left of the plot. true,false true
flagOutsidePoints boolean Whether to add Hi and LO stems showing values unusually far from the others. true,false true
maximumLeavesOnStem int Maximum leaves before adding "...". 1+ 70
maximumStems int Maximum number of stems in plot. 1+ 15
minimumStems int Minimum number of stems in plot. 1+ 10
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
xVariableName String The name of the column with data values to be plotted on the horizontal axis. Any string. "X"


Other Public Methods

Name Description Arguments Return Value
int getNumberFarOutside() Returns the number of far outside points. None. Number of data values more than 3.0 times the interquartile range from the box.
int getNumberOutside() Returns the number of outside points. None. Number of data values more than 1.5 times the interquartile range from the box.
int getNumberOfStems() Returns the number of stems. None. Number of stems.

Code Sample: 

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

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

//create a table bean 
StemLeafDisplay stemleafdisplay1 = new STATBEANS.StemLeafDisplay(); 

//set the column to be tabulated 
stemleafdisplay1.setXVariableName("strength"); 

//set the number of stems 
stemleafdisplay1.setMinimumStems(5); 
stemleafdisplay1.setMaximumStems(10); 

//add the table to the application frame 
add(stemleafdisplay1); 

//make the table bean a listener 
fileDataSource1.addDataChangeListener(stemleafdisplay1.listenerForDataChange); 

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