|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpapaya.Visuals
papaya.SubPlot
public class SubPlot
Convenient class for drawing multiple scatter plots.
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. |
ScatterPlot[][] |
s
|
float |
topBound
Specifies the space on the top, between the plot area and the bounding rectangle. |
float[][] |
xLefts
|
float |
xSpacing
|
float |
xW
|
float |
yH
|
float |
ySpacing
|
float[][] |
yTops
|
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 | |
---|---|
SubPlot(PApplet theParent,
float xLeft,
float yTop,
float xWidth,
float yHeight,
int numX,
int numY)
Creates numX*numY plots, each of with xWidth, and height yHeight. |
Method Summary | |
---|---|
void |
drawScatterPlot(float[] xDat,
float[] yDat,
int fColor,
int xnum,
int ynum)
Draws the scatterplot for subplot(xnum,ynum) by calling ScatterPlot.drawScatterPlot(float[], float[], float, int) . |
void |
legendHoriz(String where,
int[] colors,
String[] labels)
Draws a legend going to the right with the first element situated at (x,y). |
void |
legendVert(float x,
float y,
int[] colors,
String[] labels)
Draws a legend going downwards with the first element situated at (x,y). |
void |
setDataExtremes(float minXDat,
float maxXDat,
float minYDat,
float maxYDat,
int xnum,
int ynum)
Sets the data extremes for subplot(xnum,ynum) by calling ScatterPlot.setDataExtremes(float, float, float, float) |
void |
writeTitle(PFont pFont,
String title,
int xnum,
int ynum)
Writes the title for subplot(xnum,ynum). |
void |
writeTitle(String title,
int xnum,
int ynum)
Writes the title for subplot(xnum,ynum). |
void |
xLabels(int _numDiv,
int xnum,
int ynum)
Writes the x labels for subplot(xnum,ynum). |
void |
yLabels(int _numDiv,
int xnum,
int ynum)
Writes the y labels for subplot(xnum,ynum). |
Methods inherited from class papaya.Visuals |
---|
drawAxes, drawRect, drawRect, getBottom, getHeight, getLeft, getRight, getTop, getWidth, horizLine, legendHoriz, 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 drawRectangle
public boolean drawAxes
public float leftBound
public float rightBound
public float topBound
public float bottomBound
public float[][] xLefts
public float[][] yTops
public float xW
public float yH
public float ySpacing
public float xSpacing
public ScatterPlot[][] s
Constructor Detail |
---|
public SubPlot(PApplet theParent, float xLeft, float yTop, float xWidth, float yHeight, int numX, int numY)
Method Detail |
---|
public void setDataExtremes(float minXDat, float maxXDat, float minYDat, float maxYDat, int xnum, int ynum)
ScatterPlot.setDataExtremes(float, float, float, float)
public void drawScatterPlot(float[] xDat, float[] yDat, int fColor, int xnum, int ynum)
ScatterPlot.drawScatterPlot(float[], float[], float, int)
. For
more control, use s[xnum][ynum].drawScatterPlot directly.
public void writeTitle(PFont pFont, String title, int xnum, int ynum)
public void writeTitle(String title, int xnum, int ynum)
public void legendVert(float x, float y, int[] colors, String[] labels)
Visuals.legendVert(float, float, int[], java.lang.String[])
.
legendVert
in class Visuals
colors
- the legend colorslabels
- labels that go with each colorpublic void legendHoriz(String where, int[] colors, String[] labels)
where
- "top" if you want to place the legend at the top, otherwise, it
will default to placing it at the bottom of the plots.colors
- the legend colorslabels
- labels that go with each colorpublic void yLabels(int _numDiv, int xnum, int ynum)
public void xLabels(int _numDiv, int xnum, int ynum)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |