|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpapaya.Visuals
papaya.ScatterPlot
public class ScatterPlot
A simple class to plot x vs y data as a scatter plot. Default is to draw the points as ellipses, but you can also use rectangles, and connect the points with lines.
Field Summary | |
---|---|
boolean |
asConnectedLines
|
boolean |
asEllipses
|
boolean |
asRectangles
|
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. |
boolean[] |
XYLabels
|
boolean[] |
XYTicks
|
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 | |
---|---|
ScatterPlot(PApplet _theParent,
float _plotLeft,
float _plotTop,
float _plotWidth,
float _plotHeight)
|
Method Summary | |
---|---|
void |
drawRectangle()
Draws a rectangle around the plot. |
void |
drawScatterPlot(float[] _xDat,
float[] _yDat,
float _sWeight,
int _sColor)
Parent function to plot scatter plot of the data. |
void |
setDataExtremes(float _minXDat,
float _maxXDat,
float _minYDat,
float _maxYDat)
Set the minimum/maximum values on the x and y axis to nice numbers. |
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 |
---|
public boolean asConnectedLines
public boolean asRectangles
public boolean asEllipses
public boolean[] XYLabels
public boolean[] XYTicks
public boolean drawRectangle
public boolean drawAxes
public float leftBound
public float rightBound
public float topBound
public float bottomBound
Constructor Detail |
---|
public ScatterPlot(PApplet _theParent, float _plotLeft, float _plotTop, float _plotWidth, float _plotHeight)
Method Detail |
---|
public void setDataExtremes(float _minXDat, float _maxXDat, float _minYDat, float _maxYDat)
_minXDat
- the minimum x value to use. Set to more than the x data minimum._maxXDat
- the maximum x value to use. Set to more than the x data maximum._minYDat
- the minimum y value to use. Set to more than the y data minimum._maxYDat
- the maximum y value to use. Set to more than the y data maximum.public void drawRectangle()
public void drawScatterPlot(float[] _xDat, float[] _yDat, float _sWeight, int _sColor)
_xDat
- x Data array_yDat
- y Data array_sWeight
- stroke weight_sColor
- stroke color
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |