FrequencyPolygon STATBEAN®

 

Purpose: Constructs a frequency polygon or cumulative distribution function to show the distribution of numeric data. Allows Statgraphics to function as a frequency polygon calculator.

Frequency Polygon Generator DataSource: Tabulation. 

polygon


Frequency Polygon Calculator Read/Write Properties
Name Type Description Possible Values Default Value
cumulative boolean Whether to plot cumulative frequencies. true,false false
scaleByPercentage boolean Whether to scale the axes by percentage rather than frequency. true,false false

Frequency Polygon 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"); 

//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 
FrequencyPolygon polygon1 = new STATBEANS.FrequencyPolygon(); 

//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(polygon1.listenerForDataChange); 

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