org.jfree.chart.plot
public class FastScatterPlot extends Plot implements ValueAxisPlot, Zoomable, Cloneable, Serializable
Field Summary | |
---|---|
static Paint | DEFAULT_GRIDLINE_PAINT The default grid line paint. |
static Stroke | DEFAULT_GRIDLINE_STROKE The default grid line stroke. |
protected static ResourceBundle | localizationResources The resourceBundle for the localization. |
Constructor Summary | |
---|---|
FastScatterPlot()
Creates a new instance of FastScatterPlot with default
axes. | |
FastScatterPlot(float[][] data, ValueAxis domainAxis, ValueAxis rangeAxis)
Creates a new fast scatter plot.
|
Method Summary | |
---|---|
Object | clone()
Returns a clone of the plot.
|
void | draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
Draws the fast scatter plot on a Java 2D graphics device (such as the
screen or a printer).
|
protected void | drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the gridlines for the plot, if they are visible.
|
protected void | drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the gridlines for the plot, if they are visible.
|
boolean | equals(Object obj)
Tests an object for equality with this instance.
|
float[][] | getData()
Returns the data array used by the plot.
|
Range | getDataRange(ValueAxis axis)
Returns the range of data values to be plotted along the axis, or
null if the specified axis isn't the domain axis or the
range axis for the plot.
|
ValueAxis | getDomainAxis()
Returns the domain axis for the plot.
|
Paint | getDomainGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the domain
axis.
|
Stroke | getDomainGridlineStroke()
Returns the stroke for the grid-lines (if any) plotted against the
domain axis.
|
PlotOrientation | getOrientation()
Returns the orientation of the plot.
|
Paint | getPaint()
Returns the paint used to plot data points. |
String | getPlotType()
Returns a short string describing the plot type.
|
ValueAxis | getRangeAxis()
Returns the range axis for the plot.
|
Paint | getRangeGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the range
axis.
|
Stroke | getRangeGridlineStroke()
Returns the stroke for the grid lines (if any) plotted against the range
axis.
|
boolean | isDomainGridlinesVisible()
Returns true if the domain gridlines are visible, and
false |
boolean | isDomainZoomable()
Returns true .
|
boolean | isRangeGridlinesVisible()
Returns true if the range axis grid is visible, and
false |
boolean | isRangeZoomable()
Returns true .
|
void | render(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, CrosshairState crosshairState)
Draws a representation of the data within the dataArea region. |
void | setData(float[][] data)
Sets the data array used by the plot and sends a PlotChangeEvent
to all registered listeners.
|
void | setDomainAxis(ValueAxis axis)
Sets the domain axis and sends a PlotChangeEvent to all
registered listeners.
|
void | setDomainGridlinePaint(Paint paint)
Sets the paint for the grid lines plotted against the domain axis and
sends a PlotChangeEvent to all registered listeners.
|
void | setDomainGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the domain grid-lines are
visible. |
void | setDomainGridlineStroke(Stroke stroke)
Sets the stroke for the grid lines plotted against the domain axis and
sends a PlotChangeEvent to all registered listeners.
|
void | setPaint(Paint paint)
Sets the color for the data points and sends a PlotChangeEvent
to all registered listeners.
|
void | setRangeAxis(ValueAxis axis)
Sets the range axis and sends a PlotChangeEvent to all
registered listeners.
|
void | setRangeGridlinePaint(Paint paint)
Sets the paint for the grid lines plotted against the range axis and
sends a PlotChangeEvent to all registered listeners.
|
void | setRangeGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the range axis grid lines are
visible. |
void | setRangeGridlineStroke(Stroke stroke)
Sets the stroke for the grid lines plotted against the range axis and
sends a PlotChangeEvent to all registered listeners.
|
void | zoomDomainAxes(double factor, PlotRenderingInfo info, Point2D source)
Multiplies the range on the domain axis by the specified factor.
|
void | zoomDomainAxes(double factor, PlotRenderingInfo info, Point2D source, boolean useAnchor)
Multiplies the range on the domain axis by the specified factor.
|
void | zoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source)
Zooms in on the domain axes.
|
void | zoomRangeAxes(double factor, PlotRenderingInfo info, Point2D source)
Multiplies the range on the range axis/axes by the specified factor.
|
void | zoomRangeAxes(double factor, PlotRenderingInfo info, Point2D source, boolean useAnchor)
Multiplies the range on the range axis by the specified factor.
|
void | zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source)
Zooms in on the range axes.
|
FastScatterPlot
with default
axes.The data is an array of x, y values: data[0][i] = x, data[1][i] = y.
Parameters: data the data (null
permitted). domainAxis the domain (x) axis (null
not permitted). rangeAxis the range (y) axis (null
not permitted).
Returns: A clone.
Throws: CloneNotSupportedException if some component of the plot does not support cloning.
Parameters: g2 the graphics device. area the area within which the plot (including axis labels)
should be drawn. anchor the anchor point (null
permitted). parentState the state from the parent plot (ignored). info collects chart drawing information (null
permitted).
Parameters: g2 the graphics device. dataArea the data area. ticks the ticks.
Parameters: g2 the graphics device. dataArea the data area. ticks the ticks.
Parameters: obj the object (null
permitted).
Returns: A boolean.
Returns: The data array (possibly null
).
See Also: (float[][])
null
if the specified axis isn't the domain axis or the
range axis for the plot.
Parameters: axis the axis (null
permitted).
Returns: The range (possibly null
).
Returns: The domain axis (never null
).
See Also: setDomainAxis
Returns: The paint (never null
).
See Also: setDomainGridlinePaint
Returns: The stroke (never null
).
See Also: setDomainGridlineStroke
Returns: The orientation (always VERTICAL).
Color.red
.
Returns: The paint.
See Also: setPaint
Returns: A short string describing the plot type.
Returns: The range axis (never null
).
See Also: setRangeAxis
Returns: The paint (never null
).
See Also: setRangeGridlinePaint
Returns: The stroke (never null
).
See Also: setRangeGridlineStroke
true
if the domain gridlines are visible, and
false otherwise.
Returns: true
or false
.
See Also: FastScatterPlot setDomainGridlinePaint
true
.
Returns: A boolean.
true
if the range axis grid is visible, and
false otherwise.
Returns: true
or false
.
See Also: FastScatterPlot
true
.
Returns: A boolean.
info
and crosshairState
arguments may be
null
.
Parameters: g2 the graphics device. dataArea the region in which the data is to be drawn. info an optional object for collection dimension information. crosshairState collects crosshair information (null
permitted).
Parameters: data the data array (null
permitted).
See Also: getData
Parameters: axis the axis (null
not permitted).
Since: 1.0.3
See Also: getDomainAxis
Parameters: paint the paint (null
not permitted).
See Also: getDomainGridlinePaint
Parameters: visible the new value of the flag.
See Also: getDomainGridlinePaint
Parameters: stroke the stroke (null
not permitted).
See Also: getDomainGridlineStroke
Parameters: paint the paint (null
not permitted).
See Also: getPaint
Parameters: axis the axis (null
not permitted).
Since: 1.0.3
See Also: getRangeAxis
Parameters: paint the paint (null
not permitted).
See Also: getRangeGridlinePaint
Parameters: visible the new value of the flag.
See Also: isRangeGridlinesVisible
Parameters: stroke the stroke (null
permitted).
See Also: getRangeGridlineStroke
Parameters: factor the zoom factor. info the plot rendering info. source the source point.
Parameters: factor the zoom factor. info the plot rendering info. source the source point (in Java2D space). useAnchor use source point as zoom anchor?
Since: 1.0.7
Parameters: lowerPercent the new lower bound as a percentage of the current range. upperPercent the new upper bound as a percentage of the current range. info the plot rendering info. source the source point.
Parameters: factor the zoom factor. info the plot rendering info. source the source point.
Parameters: factor the zoom factor. info the plot rendering info. source the source point (in Java2D space). useAnchor use source point as zoom anchor?
Since: 1.0.7
Parameters: lowerPercent the new lower bound as a percentage of the current range. upperPercent the new upper bound as a percentage of the current range. info the plot rendering info. source the source point.