Package org.faceless.graph2
Class BoxWhiskerSeries
- java.lang.Object
-
- org.faceless.graph2.Series
-
- org.faceless.graph2.GeneralBarSeries
-
- org.faceless.graph2.BoxWhiskerSeries
-
public class BoxWhiskerSeries extends GeneralBarSeries
A BoxWhisker Series is used for plotting statistical data. It can show the mean, quartiles and extremes of a data series.- Since:
- 2.2
-
-
Constructor Summary
Constructors Constructor Description BoxWhiskerSeries(String name)
Create a new BoxWhiskerSeries
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
set(String x, double min, double bottom, double middle, double top, double max)
Add a box to the series.void
set(String x, double min, double bottom, double lower, double middle, double upper, double top, double max)
Add a box to the series.void
setSerifWidth(double width)
Set the width of the "serif" at the end of the lines.void
setShoulderWidth(double width)
Set the width of the "shoulder" of the box - the width of the box at the outer corner.void
setWaistWidth(double width)
Set the width of the "waist" of the box - the width of the box at the middle.void
setWhiskerWidth(double width)
Set the width of the "whisker" of the box.-
Methods inherited from class org.faceless.graph2.GeneralBarSeries
addMarker, setBarDepth, setBarLabels, setBarWidth, setBarWidth, setBarWidth, setRoundBars, setRoundBars, setStyle
-
Methods inherited from class org.faceless.graph2.Series
addBox, addLine, addMarker, getName, outputToSeries, outputToSeriesFunction, setStyle, toString
-
-
-
-
Constructor Detail
-
BoxWhiskerSeries
public BoxWhiskerSeries(String name)
Create a new BoxWhiskerSeries- Parameters:
name
- the name of the series
-
-
Method Detail
-
set
public void set(String x, double min, double bottom, double middle, double top, double max)
Add a box to the series. This method allows the specification of a mid-point, the top and bottom of the box (typically used to indicate the 25th and 75th percentile) and the length of the whiskers.- Parameters:
x
- the X value of this boxmin
- the minimum value of the range of values for this box. Must be <= lowerbottom
- the lower quartile of the range of values for this box. Must be <= meanmiddle
- the mean value of the range of values for this box. Must be <= uppertop
- the upper quartile of of the range of values for this box. Must be <= maxmax
- the maximum value of the range of values for this box.- Throws:
IllegalArgumentException
- if the parameters aren't in ascending order.
-
set
public void set(String x, double min, double bottom, double lower, double middle, double upper, double top, double max)
Add a box to the series. This method allows the specification of a mid-point, the upper and lower "shoulder", typically used to display the 25th and 7th percentile, the top and bottom of the box (typically used to indicate the 5th and 95th percentile) and the length of the whiskers.- Parameters:
x
- the X value of this boxmin
- the minimum value of the range of values for this box. Must be <= bottombottom
- the outermost lower percentile of the range of values for this box. Must be <= lowerlower
- the lower percentile of the range of values for this box. Must be <= meanmiddle
- the middle value of the range of values for this box. Must be <= upperupper
- the upper percentile of of the range of values for this box. Must be <= toptop
- the outermost upper percentile of of the range of values for this box. Must be <= maxmax
- the maximum value of the range of values for this box.- Throws:
IllegalArgumentException
- if the parameters aren't in ascending order.
-
setWaistWidth
public void setWaistWidth(double width)
Set the width of the "waist" of the box - the width of the box at the middle. A value of zero means the same as the barwidth (the default).- Parameters:
width
- the width of the waist of each box - must be 0 <= val <=1
-
setShoulderWidth
public void setShoulderWidth(double width)
Set the width of the "shoulder" of the box - the width of the box at the outer corner. A value of zero means the same as the barwidth (the default).- Parameters:
width
- the width of the shoulder of each box - must be 0 <= val <=1
-
setWhiskerWidth
public void setWhiskerWidth(double width)
Set the width of the "whisker" of the box. A value of zero means the whisker is drawn as a line (the default)- Parameters:
width
- the width of the shoulder of each box - must be 0 <= val <=1
-
setSerifWidth
public void setSerifWidth(double width)
Set the width of the "serif" at the end of the lines. May be zero for no serif (the default)- Parameters:
width
- the width of the serif of each whisker - must be 0 <= val <=1
-
-