Histogram STATBEAN®

 

Purpose: Histogram generator that creates plots to show the distribution of numeric data. Allows Statgraphics to function as histogram plotter. See how tools like Statgraphics Centurion XVII or stratus can help with visualizations like histograms. Contact us For more information on our histogram software.

DataSource For The Frequency Histogram Maker: Tabulation. 

histogram


Histogram Generator Read/Write Properties
Name Type Description Possible Values Default Value
drawNormalCurve boolean Whether to add the best-fitting normal distribution. true,false false
drawVertical boolean Whether to make the bars vertical. true,false true
fillColor Color Color to use for the bars. Any valid Color. Color.blue.
resolution int For continuous distributions, the number of points at which the function is calculated. 50+ 500
scaleByPercentage boolean Whether to scale the axes by percentage rather than frequency. true,false false

Frequency Histogram Maker 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 calculation bean 
Tabulation tabulation1 = new STATBEANS.Tabulation(); 

//set the column to be tabulated 
tabulation1.setXVariableName("mpg"); 

//set the type of tabulation and the limits 
tabulation1.setDataType("Continuous"); 
tabulation1.setFrom(0.0); 
tabulation1.setTo(60.0); 
tabulation1.setBy(5.0); 

//create a chart bean 
Histogram histogram1 = new STATBEANS.Histogram(); 

//set the fill color 
histogram1.setFillColor(Color.green); 

//add a normal curve 
histogram1.setAddNormalCurve(true); 

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

//make the plot bean a listener for changes in the tabulation bean 
tabulation1.addDataChangeListener(histogram1.listenerForDataChange); 

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