papaya
Class BoxPlot

java.lang.Object
  extended by papaya.Visuals
      extended by papaya.BoxPlot
All Implemented Interfaces:
PapayaConstants

public class BoxPlot
extends Visuals

BoxPlot class


Field Summary
 float bottomBound
          Specifies the space on the bottom, between the plot area and the bounding rectangle.
 boolean drawAxes
          Specifies whether to draw the axes
 boolean drawRectangle
          Specifies whether to draw the bounding rectangle around the plot.
 float leftBound
          Specifies the space on the left between the plot area, and the bounding rectangle.
 float rightBound
          Specifies the space on the right betweent the plot area, and the bounding rectangle.
 float topBound
          Specifies the space on the top, between the plot area and the bounding rectangle.
 
Fields inherited from class papaya.Visuals
bgColor
 
Fields inherited from interface papaya.PapayaConstants
BASELINE, big, biginv, BOTTOM, CENTER, CORNER, FONTNAME, GRAY, INDEX_NOT_FOUND, INDICES_NOT_FOUND, LEFT, LOGPI, MACHEP, MAXGAM, MAXLOG, MINLOG, RIGHT, SQRTH, SQTPI, STROKEWEIGHT, TEXTSIZE, TOP
 
Constructor Summary
BoxPlot(PApplet _theParent, float _plotLeft, float _plotTop, float _plotWidth, float _plotHeight)
           
 
Method Summary
 void drawBoxPlot(String[] _labels, float _sWeight, int _fColor)
          Plot the box plots.
 float[][] getData()
           
 void setData(float[][] _fiveNumArr, float _minVal, float _maxVal)
          Sets the data to be plotted.
 
Methods inherited from class papaya.Visuals
drawAxes, drawRect, drawRect, getBottom, getHeight, getLeft, getRight, getTop, getWidth, horizLine, legendHoriz, legendVert, line, mapXData, mapXData, mapYData, mapYData, setBackgroundColor, setHeight, setLeft, setTop, setupFont, setupFont, setWidth, vertLine, writeLabels, writeLabels, writeLabels, writeLabels, writeLabels, writeTitle, xLabels, xLabels, xTicks, yLabels, yLabels, YLines, yTicks
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

drawRectangle

public boolean drawRectangle
Specifies whether to draw the bounding rectangle around the plot.


drawAxes

public boolean drawAxes
Specifies whether to draw the axes


leftBound

public float leftBound
Specifies the space on the left between the plot area, and the bounding rectangle. That is, the left-most point of the rectangle is given by plotLeft-leftBound.


rightBound

public float rightBound
Specifies the space on the right betweent the plot area, and the bounding rectangle. That is, the right-most point of the rectangle is given by plotLeft+plotWidth+rightBound.


topBound

public float topBound
Specifies the space on the top, between the plot area and the bounding rectangle. That is, the top-most point of the rectangle is given by plotTop - topBound.


bottomBound

public float bottomBound
Specifies the space on the bottom, between the plot area and the bounding rectangle. That is, the bottom-most point of the rectangle is given by plotTop + plotHeight + bottomBound.

Constructor Detail

BoxPlot

public BoxPlot(PApplet _theParent,
               float _plotLeft,
               float _plotTop,
               float _plotWidth,
               float _plotHeight)
Method Detail

setData

public void setData(float[][] _fiveNumArr,
                    float _minVal,
                    float _maxVal)
Sets the data to be plotted.

Parameters:
_fiveNumArr - array of five number box plot summaries with each row corresponding to a given data set. See Descriptive.tukeyFiveNum(float[]) for more info.
_minVal - the minimum value to show in the plot
_maxVal - the maximum value to show in the plot

getData

public float[][] getData()
Returns:
the tukey five number array

drawBoxPlot

public void drawBoxPlot(String[] _labels,
                        float _sWeight,
                        int _fColor)
Plot the box plots.

Parameters:
_labels - labels for the box plot
_sWeight - the stroke weight to use for the lines.
_fColor - the fill color for the boxplots


Processing library papaya by Adila Faruk. (C) 2014