|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.charts.CategoryChart umontreal.iro.lecuyer.charts.BoxChart
public class BoxChart
This class provides tools to create and manage box-and-whisker plots.
Each BoxChart
object is linked with a
BoxSeriesCollection
data set.
A boxplot is a convenient way of viewing sets of numerical data through their summaries: the smallest observation, first quartile ( Q1 = x.25), median ( Q2 = x.5), third quartile ( Q3 = x.75), and largest observation. Sometimes, the mean and the outliers are also plotted.
In the charts created by this class, the box has its lower limit at Q1 and its upper limit at Q3. The median is indicated by the line inside the box, while the mean is at the center of the filled circle inside the box. Define the interquartile range as (Q3 - Q1). Any data observation which is more than 1.5(Q3 - Q1) lower than the first quartile or 1.5(Q3 - Q1) higher than the third quartile is considered an outlier. The smallest and the largest values that are not outliers are connected to the box with a vertical line or "whisker" which is ended by a horizontal line. Outliers are indicated by hollow circles outside the whiskers. Triangles indicate the existence of very far outliers.
Constructor Summary | |
---|---|
BoxChart()
Initializes a new BoxChart instance with an empty data set. |
|
BoxChart(String title,
String XLabel,
String YLabel,
double[]... data)
Initializes a new BoxChart instance with data data. |
|
BoxChart(String title,
String XLabel,
String YLabel,
double[] data,
int numPoints)
Initializes a new BoxChart instance with data data. |
Method Summary | |
---|---|
int |
add(double[] data)
Adds a data series into the series collection. |
int |
add(double[] data,
int numPoints)
Adds a data series into the series collection. |
BoxSeriesCollection |
getSeriesCollection()
Returns the chart's dataset. |
void |
setFillBox(boolean fill)
Sets fill to true, if the boxes are to be filled. |
void |
setSeriesCollection(BoxSeriesCollection dataset)
Links a new dataset to the current chart. |
String |
toLatex(double width,
double height)
NOT IMPLEMENTED. |
JFrame |
view(int width,
int height)
Displays chart on the screen using Swing. |
Methods inherited from class umontreal.iro.lecuyer.charts.CategoryChart |
---|
disableGrid, enableGrid, getJFreeChart, getTitle, getYAxis, setAutoRange, setLatexDocFlag, setTitle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BoxChart()
public BoxChart(String title, String XLabel, String YLabel, double[] data, int numPoints)
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.data
- point sets.numPoints
- Number of points to plotpublic BoxChart(String title, String XLabel, String YLabel, double[]... data)
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.data
- series of point sets.Method Detail |
---|
public int add(double[] data)
data
- point sets.
public int add(double[] data, int numPoints)
data
- point set.numPoints
- number of points to add.
public BoxSeriesCollection getSeriesCollection()
public void setSeriesCollection(BoxSeriesCollection dataset)
dataset
- new dataset.public void setFillBox(boolean fill)
fill
- true if the boxes are filledpublic JFrame view(int width, int height)
view
in class CategoryChart
width
- frame width.height
- frame height.
public String toLatex(double width, double height)
toLatex
in class CategoryChart
width
- Chart's width in centimeters.height
- Chart's height in centimeters.
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |