ucar.unidata.idv.control.chart
Class MyScatterPlot

java.lang.Object
  extended by org.jfree.chart.plot.Plot
      extended by org.jfree.chart.plot.XYPlot
          extended by ucar.unidata.idv.control.chart.MyScatterPlot
All Implemented Interfaces:
Serializable, Cloneable, EventListener, org.jfree.chart.event.AxisChangeListener, org.jfree.chart.event.MarkerChangeListener, org.jfree.chart.event.RendererChangeListener, org.jfree.chart.LegendItemSource, org.jfree.chart.plot.ValueAxisPlot, org.jfree.chart.plot.Zoomable, org.jfree.data.general.DatasetChangeListener, org.jfree.util.PublicCloneable

public class MyScatterPlot
extends org.jfree.chart.plot.XYPlot
implements org.jfree.chart.plot.ValueAxisPlot

A fast scatter plot.

See Also:
Serialized Form

Field Summary
protected static ResourceBundle localizationResources
          The resourceBundle for the localization.
 
Fields inherited from class org.jfree.chart.plot.XYPlot
DEFAULT_CROSSHAIR_PAINT, DEFAULT_CROSSHAIR_STROKE, DEFAULT_CROSSHAIR_VISIBLE, DEFAULT_GRIDLINE_PAINT, DEFAULT_GRIDLINE_STROKE
 
Fields inherited from class org.jfree.chart.plot.Plot
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_LEGEND_ITEM_BOX, DEFAULT_LEGEND_ITEM_CIRCLE, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO
 
Constructor Summary
MyScatterPlot(org.jfree.data.xy.XYDataset dataset, double[][] data, org.jfree.chart.axis.ValueAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis)
          Creates a new fast scatter plot.
 
Method Summary
 void addSeries(double[][] newData)
          Set the data.
 org.jfree.data.Range getDataRange(org.jfree.chart.axis.ValueAxis axis)
          Returns the range of data values to be plotted along the axis.
 org.jfree.chart.plot.PlotOrientation getOrientation()
          Returns the orientation of the plot.
 String getPlotType()
          Returns a short string describing the plot type.
 List getSeries()
          Get the time series
 void removeAllSeries()
          remove em
 boolean render(Graphics2D g2, Rectangle2D dataArea, int index, org.jfree.chart.plot.PlotRenderingInfo info, org.jfree.chart.plot.CrosshairState crosshairState)
          Draws the fast scatter plot on a Java 2D graphics device (such as the screen or a printer).
 
Methods inherited from class org.jfree.chart.plot.XYPlot
addAnnotation, addDomainMarker, addDomainMarker, addDomainMarker, addRangeMarker, addRangeMarker, addRangeMarker, calculateAxisSpace, calculateDomainAxisSpace, calculateRangeAxisSpace, clearAnnotations, clearDomainAxes, clearDomainMarkers, clearDomainMarkers, clearRangeAxes, clearRangeMarkers, clearRangeMarkers, clone, configureDomainAxes, configureRangeAxes, datasetChanged, draw, drawAnnotations, drawAxes, drawBackground, drawDomainCrosshair, drawDomainGridlines, drawDomainMarkers, drawDomainTickBands, drawHorizontalLine, drawQuadrants, drawRangeCrosshair, drawRangeGridlines, drawRangeMarkers, drawRangeTickBands, drawVerticalLine, drawZeroDomainBaseline, drawZeroRangeBaseline, equals, getAnnotations, getAxisOffset, getDataset, getDataset, getDatasetCount, getDatasetRenderingOrder, getDomainAxis, getDomainAxis, getDomainAxisCount, getDomainAxisEdge, getDomainAxisEdge, getDomainAxisForDataset, getDomainAxisIndex, getDomainAxisLocation, getDomainAxisLocation, getDomainCrosshairPaint, getDomainCrosshairStroke, getDomainCrosshairValue, getDomainGridlinePaint, getDomainGridlineStroke, getDomainMarkers, getDomainMarkers, getDomainTickBandPaint, getDomainZeroBaselinePaint, getDomainZeroBaselineStroke, getFixedDomainAxisSpace, getFixedLegendItems, getFixedRangeAxisSpace, getIndexOf, getLegendItems, getQuadrantOrigin, getQuadrantPaint, getRangeAxis, getRangeAxis, getRangeAxisCount, getRangeAxisEdge, getRangeAxisEdge, getRangeAxisForDataset, getRangeAxisIndex, getRangeAxisLocation, getRangeAxisLocation, getRangeCrosshairPaint, getRangeCrosshairStroke, getRangeCrosshairValue, getRangeGridlinePaint, getRangeGridlineStroke, getRangeMarkers, getRangeMarkers, getRangeTickBandPaint, getRangeZeroBaselinePaint, getRangeZeroBaselineStroke, getRenderer, getRenderer, getRendererForDataset, getSeriesCount, getSeriesRenderingOrder, getWeight, handleClick, indexOf, isDomainCrosshairLockedOnData, isDomainCrosshairVisible, isDomainGridlinesVisible, isDomainZeroBaselineVisible, isDomainZoomable, isRangeCrosshairLockedOnData, isRangeCrosshairVisible, isRangeGridlinesVisible, isRangeZeroBaselineVisible, isRangeZoomable, mapDatasetToDomainAxis, mapDatasetToRangeAxis, removeAnnotation, removeDomainMarker, removeDomainMarker, removeDomainMarker, removeRangeMarker, removeRangeMarker, removeRangeMarker, rendererChanged, setAxisOffset, setDataset, setDataset, setDatasetRenderingOrder, setDomainAxes, setDomainAxis, setDomainAxis, setDomainAxis, setDomainAxisLocation, setDomainAxisLocation, setDomainAxisLocation, setDomainAxisLocation, setDomainCrosshairLockedOnData, setDomainCrosshairPaint, setDomainCrosshairStroke, setDomainCrosshairValue, setDomainCrosshairValue, setDomainCrosshairVisible, setDomainGridlinePaint, setDomainGridlineStroke, setDomainGridlinesVisible, setDomainTickBandPaint, setDomainZeroBaselinePaint, setDomainZeroBaselineStroke, setDomainZeroBaselineVisible, setFixedDomainAxisSpace, setFixedLegendItems, setFixedRangeAxisSpace, setOrientation, setQuadrantOrigin, setQuadrantPaint, setRangeAxes, setRangeAxis, setRangeAxis, setRangeAxis, setRangeAxisLocation, setRangeAxisLocation, setRangeAxisLocation, setRangeAxisLocation, setRangeCrosshairLockedOnData, setRangeCrosshairPaint, setRangeCrosshairStroke, setRangeCrosshairValue, setRangeCrosshairValue, setRangeCrosshairVisible, setRangeGridlinePaint, setRangeGridlineStroke, setRangeGridlinesVisible, setRangeTickBandPaint, setRangeZeroBaselinePaint, setRangeZeroBaselineStroke, setRangeZeroBaselineVisible, setRenderer, setRenderer, setRenderer, setRenderers, setSeriesRenderingOrder, setWeight, zoomDomainAxes, zoomDomainAxes, zoomDomainAxes, zoomRangeAxes, zoomRangeAxes, zoomRangeAxes
 
Methods inherited from class org.jfree.chart.plot.Plot
addChangeListener, axisChanged, drawBackgroundImage, drawNoDataMessage, drawOutline, fillBackground, fillBackground, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRectX, getRectY, getRootPlot, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setDatasetGroup, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent, zoom
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localizationResources

protected static ResourceBundle localizationResources
The resourceBundle for the localization.

Constructor Detail

MyScatterPlot

public MyScatterPlot(org.jfree.data.xy.XYDataset dataset,
                     double[][] data,
                     org.jfree.chart.axis.ValueAxis domainAxis,
                     org.jfree.chart.axis.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:
dataset - The dataset
data - the data.
domainAxis - the domain (x) axis.
rangeAxis - the range (y) axis.
Method Detail

removeAllSeries

public void removeAllSeries()
remove em


getSeries

public List getSeries()
Get the time series

Returns:
Time series

addSeries

public void addSeries(double[][] newData)
Set the data. Redraw the plot.

Parameters:
newData - The data

getPlotType

public String getPlotType()
Returns a short string describing the plot type.

Overrides:
getPlotType in class org.jfree.chart.plot.XYPlot
Returns:
A short string describing the plot type.

getOrientation

public org.jfree.chart.plot.PlotOrientation getOrientation()
Returns the orientation of the plot.

Specified by:
getOrientation in interface org.jfree.chart.plot.Zoomable
Overrides:
getOrientation in class org.jfree.chart.plot.XYPlot
Returns:
The orientation (always PlotOrientation.VERTICAL).

render

public boolean render(Graphics2D g2,
                      Rectangle2D dataArea,
                      int index,
                      org.jfree.chart.plot.PlotRenderingInfo info,
                      org.jfree.chart.plot.CrosshairState crosshairState)
Draws the fast scatter plot on a Java 2D graphics device (such as the screen or a printer). a

Overrides:
render in class org.jfree.chart.plot.XYPlot
Parameters:
g2 - the graphics device.
dataArea - the data area
index - which data set
info - collects chart drawing information (null permitted).
crosshairState - crosshairState
Returns:
did something

getDataRange

public org.jfree.data.Range getDataRange(org.jfree.chart.axis.ValueAxis axis)
Returns the range of data values to be plotted along the axis.

Specified by:
getDataRange in interface org.jfree.chart.plot.ValueAxisPlot
Overrides:
getDataRange in class org.jfree.chart.plot.XYPlot
Parameters:
axis - the axis.
Returns:
The range.