org.omegahat.Graphics.Plots
Class ScatterPlot
java.lang.Object
|
+--org.omegahat.Graphics.Primitives.GraphicalObject
|
+--org.omegahat.Graphics.Primitives.RGO
|
+--org.omegahat.Graphics.Primitives.GraphicalElement
|
+--org.omegahat.Graphics.Plots.DataPlot
|
+--org.omegahat.Graphics.Plots.ScatterPlot
- public class ScatterPlot
- extends DataPlot
|
Method Summary |
GraphicalElement |
addData(double[] x,
double[] y,
int type,
int rescale)
|
GraphicalElement |
addIcons(double[] x,
double[] y,
int rescale)
add an icon (the current default StringIcon in this call) at each of the
points x[i], y[i]. |
GraphicalElement |
addLines(double[] x,
double[] y,
int rescale)
|
Scale |
dataScaleX(double[] x,
int how)
use the x array to scale or re-scale the x co-ordinates of the
plot. |
Scale |
dataScaleY(double[] y,
int how)
use the y array to scale or re-scale the y co-ordinates of the
plot. |
| Methods inherited from class org.omegahat.Graphics.Primitives.GraphicalElement |
addGraphicalObject,
addGraphicalObject,
draw,
parent,
parent,
setOrigin,
setRegionAllocator,
setXScale,
setYScale,
XScale,
YScale |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
POINTS
public static final int POINTS
LINES
public static final int LINES
ICONS
public static final int ICONS
NEW_SCALE
public static final int NEW_SCALE
- the constants for rescaling: new scale, extended, or fit to current.
EXTEND_SCALE
public static final int EXTEND_SCALE
CURRENT_SCALE
public static final int CURRENT_SCALE
verbose
public boolean verbose
ScatterPlot
public ScatterPlot()
ScatterPlot
public ScatterPlot(Scale sx,
Scale sy)
ScatterPlot
public ScatterPlot(double[] x,
double[] y)
ScatterPlot
public ScatterPlot(double[] x,
double[] y,
int type)
addData
public GraphicalElement addData(double[] x,
double[] y,
int type,
int rescale)
addIcons
public GraphicalElement addIcons(double[] x,
double[] y,
int rescale)
- add an icon (the current default StringIcon in this call) at each of the
points x[i], y[i].
The added icons can extend or replace the current scale, or be clipped to it,
depending on the value of the rescale argument.
addLines
public GraphicalElement addLines(double[] x,
double[] y,
int rescale)
dataScaleX
public Scale dataScaleX(double[] x,
int how)
- use the x array to scale or re-scale the x co-ordinates of the
plot.
The second argument controls how the scaling is done: NEW_SCALE,
EXTEND_SCALE, or CURRENT_SCALE.
dataScaleY
public Scale dataScaleY(double[] y,
int how)
- use the y array to scale or re-scale the y co-ordinates of the
plot.
The second argument controls how the scaling is done: NEW_SCALE,
EXTEND_SCALE, or CURRENT_SCALE.