com.jrefinery.chart
Class FastScatterPlot

java.lang.Object
  |
  +--com.jrefinery.chart.Plot
        |
        +--com.jrefinery.chart.FastScatterPlot
All Implemented Interfaces:
AxisChangeListener, AxisConstants, DatasetChangeListener, java.util.EventListener

public class FastScatterPlot
extends Plot

A fast scatter plot.

Author:
DG

Fields inherited from class com.jrefinery.chart.Plot
backgroundAlpha, backgroundImage, backgroundPaint, dataset, DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, foregroundAlpha, insets, listenerList, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, noDataMessage, noDataMessageFont, outlinePaint, outlineStroke, seriesOutlinePaint, seriesOutlineStroke, seriesPaint, seriesStroke, shapeFactory, ZERO
 
Fields inherited from interface com.jrefinery.chart.AxisConstants
DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_PAINT, DEFAULT_TICK_STROKE
 
Constructor Summary
FastScatterPlot(float[][] data, ValueAxis domainAxis, ValueAxis rangeAxis)
          Creates a new fast scatter plot.
 
Method Summary
 void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, ChartRenderingInfo info)
          Draws the fast scatter plot on a Java 2D graphics device (such as the screen or a printer).
 ValueAxis getDomainAxis()
          Returns the domain axis for the plot.
 java.lang.String getPlotType()
          Returns a short string describing the plot type.
 ValueAxis getRangeAxis()
          Returns the range axis for the plot.
 void render(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, ChartRenderingInfo info, CrosshairInfo crosshairInfo)
          Draws a representation of the data within the dataArea region.
 
Methods inherited from class com.jrefinery.chart.Plot
addChangeListener, axisChanged, datasetChanged, drawNoDataMessage, drawOutlineAndBackground, getBackgroundAlpha, getBackgroundPaint, getDataset, getDatasetGroup, getForegroundAlpha, getInsets, getLegendItemLabels, getLegendItems, getNoDataMessage, getNoDataMessageFont, getOutlinePaint, getOutlineStroke, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesStroke, getShape, getShape, getShapeFactory, handleClick, isSubplot, notifyListeners, removeChangeListener, setBackgroundAlpha, setBackgroundImage, setBackgroundPaint, setDataset, setDatasetGroup, setForegroundAlpha, setInsets, setNoDataMessage, setNoDataMessageFont, setOutlinePaint, setOutlineStroke, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesStroke, setSeriesStroke, setShapeFactory, zoom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastScatterPlot

public FastScatterPlot(float[][] data,
                       ValueAxis domainAxis,
                       ValueAxis rangeAxis)
Creates a new fast scatter plot.

The data is an array of x, y values: data[0][i] = x, data[1][i] = y.

Parameters:
data - the data.
domainAxis - the domain (x) axis.
rangeAxis - the range (y) axis.
Method Detail

getDomainAxis

public ValueAxis getDomainAxis()
Returns the domain axis for the plot. If the domain axis for this plot is null, then the method will return the parent plot's domain axis (if there is a parent plot).
Returns:
the domain axis.

getRangeAxis

public ValueAxis getRangeAxis()
Returns the range axis for the plot. If the range axis for this plot is null, then the method will return the parent plot's range axis (if there is a parent plot).
Returns:
the range axis.

draw

public void draw(java.awt.Graphics2D g2,
                 java.awt.geom.Rectangle2D plotArea,
                 ChartRenderingInfo info)
Draws the fast scatter plot on a Java 2D graphics device (such as the screen or a printer).
Overrides:
draw in class Plot
Parameters:
g2 - the graphics device.
plotArea - the area within which the plot (including axis labels) should be drawn.
info - collects chart drawing information (null permitted).

render

public void render(java.awt.Graphics2D g2,
                   java.awt.geom.Rectangle2D dataArea,
                   ChartRenderingInfo info,
                   CrosshairInfo crosshairInfo)
Draws a representation of the data within the dataArea region.

The info and crosshairInfo 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.
crosshairInfo - an optional object for collecting crosshair info.

getPlotType

public java.lang.String getPlotType()
Returns a short string describing the plot type.
Overrides:
getPlotType in class Plot
Returns:
a short string describing the plot type.