org.jfree.chart.plot
Class XYPlot

A general class for plotting data in the form of (x, y) pairs. This plot can use data from any class that implements the XYDataset interface.

XYPlot makes use of an XYItemRenderer to draw each point on the plot. By using different renderers, various chart types can be produced.

The ChartFactory class contains static methods for creating pre-configured charts.

SinceNot specified.
VersionNot specified.
AuthorNot specified.
Wiki javadoc Use textile entry format.

.,//,.

Field Summary
static Paint DEFAULT_CROSSHAIR_PAINT
The default crosshair paint.
static Stroke DEFAULT_CROSSHAIR_STROKE
The default crosshair stroke.
static boolean DEFAULT_CROSSHAIR_VISIBLE
The default crosshair visibility.
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
XYPlot()
Default constructor.
XYPlot( XYDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, XYItemRenderer renderer )
Creates a new plot.
Method Summary
void addAnnotation( XYAnnotation annotation )
Adds an annotation to the plot and sends a PlotChangeEvent to all registered listeners.
void addDomainMarker( Marker marker )
Adds a marker for the domain axis and sends a PlotChangeEvent to all registered listeners.
void addDomainMarker( Marker marker, Layer layer )
Adds a marker for the domain axis in the specified layer and sends a PlotChangeEvent to all registered listeners.
void addDomainMarker( int index, Marker marker, Layer layer )
Adds a marker for a renderer and sends a PlotChangeEvent to all registered listeners.
void addRangeMarker( Marker marker )
Adds a marker for the range axis and sends a PlotChangeEvent to all registered listeners.
void addRangeMarker( Marker marker, Layer layer )
Adds a marker for the range axis in the specified layer and sends a PlotChangeEvent to all registered listeners.
void addRangeMarker( int index, Marker marker, Layer layer )
Adds a marker for a renderer and sends a PlotChangeEvent to all registered listeners.
protected AxisSpace calculateAxisSpace( Graphics2D g2, Rectangle2D plotArea )
Calculates the space required for all the axes in the plot.
protected AxisSpace calculateDomainAxisSpace( Graphics2D g2, Rectangle2D plotArea, AxisSpace space )
Calculates the space required for the domain axis/axes.
protected AxisSpace calculateRangeAxisSpace( Graphics2D g2, Rectangle2D plotArea, AxisSpace space )
Calculates the space required for the range axis/axes.
void clearAnnotations()
Clears all the annotations and sends a PlotChangeEvent to all registered listeners.
void clearDomainAxes()
Clears the domain axes from the plot and sends a PlotChangeEvent to all registered listeners.
void clearDomainMarkers()
Clears all the (foreground and background) domain markers and sends a PlotChangeEvent to all registered listeners.
void clearDomainMarkers( int index )
Clears the (foreground and background) domain markers for a particular renderer.
void clearRangeAxes()
Clears the range axes from the plot and sends a PlotChangeEvent to all registered listeners.
void clearRangeMarkers()
Clears all the range markers and sends a PlotChangeEvent to all registered listeners.
void clearRangeMarkers( int index )
Clears the (foreground and background) range markers for a particular renderer.
Object clone()
Returns a clone of the plot.
void configureDomainAxes()
Configures the domain axes.
void configureRangeAxes()
Configures the range axes.
void datasetChanged( DatasetChangeEvent event )
Receives notification of a change to the plot's dataset.
void draw( Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info )
Draws the plot within the specified area on a graphics device.
void drawAnnotations( Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info )
Draws the annotations for the plot.
protected Map drawAxes( Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, PlotRenderingInfo plotState )
A utility method for drawing the axes.
void drawBackground( Graphics2D g2, Rectangle2D area )
Draws the background for the plot.
protected void drawDomainGridlines( Graphics2D g2, Rectangle2D dataArea, List ticks )
Draws the gridlines for the plot, if they are visible.
protected void drawDomainMarkers( Graphics2D g2, Rectangle2D dataArea, int index, Layer layer )
Draws the domain markers (if any) for an axis and layer.
void drawDomainTickBands( Graphics2D g2, Rectangle2D dataArea, List ticks )
Draws the domain tick bands, if any.
protected void drawHorizontalLine( Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint )
Utility method for drawing a horizontal line across the data area of the plot.
protected void drawQuadrants( Graphics2D g2, Rectangle2D area )
Draws the quadrants.
protected void drawRangeGridlines( Graphics2D g2, Rectangle2D area, List ticks )
Draws the gridlines for the plot's primary range axis, if they are visible.
protected void drawRangeMarkers( Graphics2D g2, Rectangle2D dataArea, int index, Layer layer )
Draws the range markers (if any) for a renderer and layer.
void drawRangeTickBands( Graphics2D g2, Rectangle2D dataArea, List ticks )
Draws the range tick bands, if any.
protected void drawVerticalLine( Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint )
Utility method for drawing a vertical line on the data area of the plot.
protected void drawZeroRangeBaseline( Graphics2D g2, Rectangle2D area )
Draws a base line across the chart at value zero on the range axis.
boolean equals( Object obj )
Tests this plot for equality with another object.
List getAnnotations()
Returns the list of annotations.
RectangleInsets getAxisOffset()
Returns the axis offset.
Range getDataRange( ValueAxis axis )
Returns the range for the specified axis.
XYDataset getDataset()
Returns the primary dataset for the plot.
XYDataset getDataset( int index )
Returns a dataset.
int getDatasetCount()
Returns the number of datasets.
DatasetRenderingOrder getDatasetRenderingOrder()
Returns the dataset rendering order.
ValueAxis getDomainAxis()
Returns the domain axis for the plot.
ValueAxis getDomainAxis( int index )
Returns a domain axis.
int getDomainAxisCount()
Returns the number of domain axes.
RectangleEdge getDomainAxisEdge()
Returns the edge for the primary domain axis (taking into account the plot's orientation.
RectangleEdge getDomainAxisEdge( int index )
Returns the edge for a domain axis.
ValueAxis getDomainAxisForDataset( int index )
Returns the domain axis for a dataset.
protected int getDomainAxisIndex( ValueAxis axis )
Returns the index of the given domain axis.
AxisLocation getDomainAxisLocation()
Returns the location of the primary domain axis.
AxisLocation getDomainAxisLocation( int index )
Returns the location for a domain axis.
Paint getDomainCrosshairPaint()
Returns the domain crosshair color.
Stroke getDomainCrosshairStroke()
Returns the Stroke used to draw the crosshair (if visible).
double getDomainCrosshairValue()
Returns the domain crosshair value.
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.
Collection getDomainMarkers( Layer layer )
Returns the list of domain markers (read only) for the specified layer.
Collection getDomainMarkers( int index, Layer layer )
Returns a collection of domain markers for a particular renderer and layer.
Paint getDomainTickBandPaint()
Returns the paint used for the domain tick bands.
AxisSpace getFixedDomainAxisSpace()
Returns the fixed domain axis space.
LegendItemCollection getFixedLegendItems()
Returns the fixed legend items, if any.
AxisSpace getFixedRangeAxisSpace()
Returns the fixed range axis space.
int getIndexOf( XYItemRenderer renderer )
Returns the index of the specified renderer, or -1 if the renderer is not assigned to this plot.
LegendItemCollection getLegendItems()
Returns the legend items for the plot.
PlotOrientation getOrientation()
Returns the orientation of the plot.
String getPlotType()
Returns the plot type as a string.
Point2D getQuadrantOrigin()
Returns the origin for the quadrants that can be displayed on the plot.
Paint getQuadrantPaint( int index )
Returns the paint used for the specified quadrant.
ValueAxis getRangeAxis()
Returns the range axis for the plot.
ValueAxis getRangeAxis( int index )
Returns a range axis.
int getRangeAxisCount()
Returns the number of range axes.
RectangleEdge getRangeAxisEdge()
Returns the edge for the primary range axis.
RectangleEdge getRangeAxisEdge( int index )
Returns the edge for a range axis.
ValueAxis getRangeAxisForDataset( int index )
Returns the range axis for a dataset.
protected int getRangeAxisIndex( ValueAxis axis )
Returns the index of the given range axis.
AxisLocation getRangeAxisLocation()
Returns the location of the primary range axis.
AxisLocation getRangeAxisLocation( int index )
Returns the location for a range axis.
Paint getRangeCrosshairPaint()
Returns the range crosshair color.
Stroke getRangeCrosshairStroke()
Returns the Stroke used to draw the crosshair (if visible).
double getRangeCrosshairValue()
Returns the range crosshair value.
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.
Collection getRangeMarkers( Layer layer )
Returns the list of range markers (read only) for the specified layer.
Collection getRangeMarkers( int index, Layer layer )
Returns a collection of range markers for a particular renderer and layer.
Paint getRangeTickBandPaint()
Returns the paint used for the range tick bands.
Paint getRangeZeroBaselinePaint()
Returns the paint for the zero baseline (if any) plotted against the range axis.
Stroke getRangeZeroBaselineStroke()
Returns the stroke used for the zero baseline against the range axis.
XYItemRenderer getRenderer()
Returns the renderer for the primary dataset.
XYItemRenderer getRenderer( int index )
Returns the renderer for a dataset, or null.
XYItemRenderer getRendererForDataset( XYDataset dataset )
Returns the renderer for the specified dataset.
int getSeriesCount()
Returns the number of series in the primary dataset for this plot.
SeriesRenderingOrder getSeriesRenderingOrder()
Returns the series rendering order.
int getWeight()
Returns the weight for this plot when it is used as a subplot within a combined plot.
void handleClick( int x, int y, PlotRenderingInfo info )
Handles a 'click' on the plot by updating the anchor values...
int indexOf( XYDataset dataset )
Returns the index of the specified dataset, or -1 if the dataset does not belong to the plot.
boolean isDomainCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
boolean isDomainCrosshairVisible()
Returns a flag indicating whether or not the domain crosshair is visible.
boolean isDomainGridlinesVisible()
Returns true if the domain gridlines are visible, and false otherwise.
boolean isDomainZoomable()
Returns true
boolean isRangeCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
boolean isRangeCrosshairVisible()
Returns a flag indicating whether or not the range crosshair is visible.
boolean isRangeGridlinesVisible()
Returns true if the range axis grid is visible, and false otherwise.
boolean isRangeZeroBaselineVisible()
Returns a flag that controls whether or not a zero baseline is displayed for the range axis.
boolean isRangeZoomable()
Returns true
void mapDatasetToDomainAxis( int index, int axisIndex )
Maps a dataset to a particular domain axis.
void mapDatasetToRangeAxis( int index, int axisIndex )
Maps a dataset to a particular range axis.
boolean removeAnnotation( XYAnnotation annotation )
Removes an annotation from the plot and sends a PlotChangeEvent to all registered listeners.
boolean render( Graphics2D g2, Rectangle2D dataArea, int index, PlotRenderingInfo info, CrosshairState crosshairState )
Draws a representation of the data within the dataArea region, using the current renderer.
void rendererChanged( RendererChangeEvent event )
Receives notification of a renderer change event.
void setAxisOffset( RectangleInsets offset )
Sets the axis offsets (gap between the data area and the axes).
void setDataset( XYDataset dataset )
Sets the primary dataset for the plot, replacing the existing dataset if there is one.
void setDataset( int index, XYDataset dataset )
Sets a dataset for the plot.
void setDatasetRenderingOrder( DatasetRenderingOrder order )
Sets the rendering order and sends a PlotChangeEvent to all registered listeners.
void setDomainAxes( ValueAxis [] axes )
Sets the domain axes for this plot and sends a PlotChangeEvent to all registered listeners.
void setDomainAxis( ValueAxis axis )
Sets the domain axis for the plot and sends a PlotChangeEvent to all registered listeners.
void setDomainAxis( int index, ValueAxis axis )
Sets a domain axis and sends a PlotChangeEvent to all registered listeners.
void setDomainAxis( int index, ValueAxis axis, boolean notify )
Sets a domain axis and, if requested, sends a PlotChangeEvent to all registered listeners.
void setDomainAxisLocation( AxisLocation location )
Sets the location of the domain axis and sends a PlotChangeEvent to all registered listeners.
void setDomainAxisLocation( AxisLocation location, boolean notify )
Sets the location of the domain axis and, if requested, sends a PlotChangeEvent to all registered listeners.
void setDomainAxisLocation( int index, AxisLocation location )
Sets the location for a domain axis and sends a PlotChangeEvent to all registered listeners.
void setDomainCrosshairLockedOnData( boolean flag )
Sets the flag indicating whether or not the domain crosshair should "lock-on" to actual data values.
void setDomainCrosshairPaint( Paint paint )
Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
void setDomainCrosshairStroke( Stroke stroke )
Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
void setDomainCrosshairValue( double value )
Sets the domain crosshair value and sends a PlotChangeEvent to all registered listeners (provided that the domain crosshair is visible).
void setDomainCrosshairValue( double value, boolean notify )
Sets the domain crosshair value and, if requested, sends a PlotChangeEvent to all registered listeners (provided that the domain crosshair is visible).
void setDomainCrosshairVisible( boolean flag )
Sets the flag indicating whether or not the domain crosshair is visible.
void setDomainGridlinePaint( Paint paint )
Sets the paint for the grid lines plotted against the domain axis.
void setDomainGridlineStroke( Stroke stroke )
Sets the stroke for the grid lines plotted against the domain axis.
void setDomainGridlinesVisible( boolean visible )
Sets the flag that controls whether or not the domain grid-lines are visible.
void setDomainTickBandPaint( Paint paint )
Sets the paint for the domain tick bands.
void setFixedDomainAxisSpace( AxisSpace space )
Sets the fixed domain axis space.
void setFixedLegendItems( LegendItemCollection items )
Sets the fixed legend items for the plot.
void setFixedRangeAxisSpace( AxisSpace space )
Sets the fixed range axis space.
void setOrientation( PlotOrientation orientation )
Sets the orientation for the plot.
void setQuadrantOrigin( Point2D origin )
Sets the quadrant origin and sends a PlotChangeEvent to all registered listeners.
void setQuadrantPaint( int index, Paint paint )
Sets the paint used for the specified quadrant and sends a PlotChangeEvent to all registered listeners.
void setRangeAxes( ValueAxis [] axes )
Sets the range axes for this plot and sends a PlotChangeEvent to all registered listeners.
void setRangeAxis( ValueAxis axis )
Sets the range axis for the plot and sends a PlotChangeEvent to all registered listeners.
void setRangeAxis( int index, ValueAxis axis )
Sets a range axis and sends a PlotChangeEvent to all registered listeners.
void setRangeAxis( int index, ValueAxis axis, boolean notify )
Sets a range axis and, if requested, sends a PlotChangeEvent to all registered listeners.
void setRangeAxisLocation( AxisLocation location )
Sets the location of the primary range axis and sends a PlotChangeEvent to all registered listeners.
void setRangeAxisLocation( AxisLocation location, boolean notify )
Sets the location of the primary range axis and, if requested, sends a PlotChangeEvent to all registered listeners.
void setRangeAxisLocation( int index, AxisLocation location )
Sets the location for a range axis and sends a PlotChangeEvent to all registered listeners.
void setRangeCrosshairLockedOnData( boolean flag )
Sets the flag indicating whether or not the range crosshair should "lock-on" to actual data values.
void setRangeCrosshairPaint( Paint paint )
Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
void setRangeCrosshairStroke( Stroke stroke )
Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
void setRangeCrosshairValue( double value )
Sets the domain crosshair value.
void setRangeCrosshairValue( double value, boolean notify )
Sets the range crosshair value.
void setRangeCrosshairVisible( boolean flag )
Sets the flag indicating whether or not the range crosshair is visible.
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 setRangeGridlineStroke( Stroke stroke )
Sets the stroke 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 setRangeTickBandPaint( Paint paint )
Sets the paint for the range tick bands.
void setRangeZeroBaselinePaint( Paint paint )
Sets the paint for the zero baseline plotted against the range axis and sends a PlotChangeEvent to all registered listeners.
void setRangeZeroBaselineStroke( Stroke stroke )
Sets the stroke for the zero baseline for the range axis, and sends a PlotChangeEvent to all registered listeners.
void setRangeZeroBaselineVisible( boolean visible )
Sets the flag that controls whether or not the zero baseline is displayed for the range axis, and sends a PlotChangeEvent to all registered listeners.
void setRenderer( XYItemRenderer renderer )
Sets the renderer for the primary dataset and sends a PlotChangeEvent to all registered listeners.
void setRenderer( int index, XYItemRenderer renderer )
Sets a renderer and sends a PlotChangeEvent to all registered listeners.
void setRenderer( int index, XYItemRenderer renderer, boolean notify )
Sets a renderer and sends a PlotChangeEvent to all registered listeners.
void setRenderers( XYItemRenderer [] renderers )
Sets the renderers for this plot and sends a PlotChangeEvent to all registered listeners.
void setSeriesRenderingOrder( SeriesRenderingOrder order )
Sets the series order and sends a PlotChangeEvent to all registered listeners.
void setWeight( int weight )
Sets the weight for the plot.
void zoomDomainAxes( double factor, PlotRenderingInfo info, Point2D source )
Multiplies the range on the domain axis/axes by the specified factor.
void zoomDomainAxes( double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source )
Zooms in on the domain axis/axes.
void zoomRangeAxes( double factor, PlotRenderingInfo info, Point2D source )
Multiplies the range on the range axis/axes by the specified factor.
void zoomRangeAxes( double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source )
Zooms in on the range axes.
Methods inherited from org.jfree.chart.eventAxisChangeListener
DEFAULT_CROSSHAIR_PAINT
public static Paint DEFAULT_CROSSHAIR_PAINT
The default crosshair paint.
Wiki javadoc Use textile entry format.
Add your comments here.
DEFAULT_CROSSHAIR_STROKE
public static Stroke DEFAULT_CROSSHAIR_STROKE
The default crosshair stroke.
Wiki javadoc Use textile entry format.
Add your comments here.
DEFAULT_CROSSHAIR_VISIBLE
public static boolean DEFAULT_CROSSHAIR_VISIBLE
The default crosshair visibility.
Wiki javadoc Use textile entry format.
Add your comments here.
DEFAULT_GRIDLINE_PAINT
public static Paint DEFAULT_GRIDLINE_PAINT
The default grid line paint.
Wiki javadoc Use textile entry format.
Add your comments here.
DEFAULT_GRIDLINE_STROKE
public static Stroke DEFAULT_GRIDLINE_STROKE
The default grid line stroke.
Wiki javadoc Use textile entry format.
Add your comments here.
localizationResources
protected static ResourceBundle localizationResources
The resourceBundle for the localization.
Wiki javadoc Use textile entry format.
Add your comments here.
XYPlot
public XYPlot ( )
Default constructor.
Wiki javadoc Use textile entry format.
Add your comments here.
XYPlot
public XYPlot ( XYDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, XYItemRenderer renderer )
Creates a new plot.
Parameters
TypeNameDescription
XYDataset dataset the dataset (null permitted).
ValueAxis domainAxis the domain axis (null permitted).
ValueAxis rangeAxis the range axis (null permitted).
XYItemRenderer renderer the renderer (null permitted).
Wiki javadoc Use textile entry format.
Add your comments here.
addAnnotation
public void addAnnotation ( XYAnnotation annotation )
Adds an annotation to the plot and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
XYAnnotation annotation the annotation (null not permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
addDomainMarker
public void addDomainMarker ( Marker marker )
Adds a marker for the domain axis and sends a PlotChangeEvent to all registered listeners.

Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer.

Parameters
TypeNameDescription
Marker marker the marker (null not permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
addDomainMarker
public void addDomainMarker ( Marker marker, Layer layer )
Adds a marker for the domain axis in the specified layer and sends a PlotChangeEvent to all registered listeners.

Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer.

Parameters
TypeNameDescription
Marker marker the marker (null not permitted).
Layer layer the layer (foreground or background).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
addDomainMarker
public void addDomainMarker ( int index, Marker marker, Layer layer )
Adds a marker for a renderer and sends a PlotChangeEvent to all registered listeners.

Typically a marker will be drawn by the renderer as a line perpendicular to the domain axis (that the renderer is mapped to), however this is entirely up to the renderer.

Parameters
TypeNameDescription
int index the renderer index.
Marker marker the marker.
Layer layer the layer (foreground or background).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
addRangeMarker
public void addRangeMarker ( Marker marker )
Adds a marker for the range axis and sends a PlotChangeEvent to all registered listeners.

Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer.

Parameters
TypeNameDescription
Marker marker the marker (null not permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
addRangeMarker
public void addRangeMarker ( Marker marker, Layer layer )
Adds a marker for the range axis in the specified layer and sends a PlotChangeEvent to all registered listeners.

Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer.

Parameters
TypeNameDescription
Marker marker the marker (null not permitted).
Layer layer the layer (foreground or background).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
addRangeMarker
public void addRangeMarker ( int index, Marker marker, Layer layer )
Adds a marker for a renderer and sends a PlotChangeEvent to all registered listeners.

Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer.

Parameters
TypeNameDescription
int index the renderer index.
Marker marker the marker.
Layer layer the layer (foreground or background).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
calculateAxisSpace
protected AxisSpace calculateAxisSpace ( Graphics2D g2, Rectangle2D plotArea )
Calculates the space required for all the axes in the plot.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D plotArea the plot area.
Wiki javadoc Use textile entry format.
Add your comments here.
calculateDomainAxisSpace
protected AxisSpace calculateDomainAxisSpace ( Graphics2D g2, Rectangle2D plotArea, AxisSpace space )
Calculates the space required for the domain axis/axes.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D plotArea the plot area.
AxisSpace space a carrier for the result (null permitted).
Wiki javadoc Use textile entry format.
Add your comments here.
calculateRangeAxisSpace
protected AxisSpace calculateRangeAxisSpace ( Graphics2D g2, Rectangle2D plotArea, AxisSpace space )
Calculates the space required for the range axis/axes.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D plotArea the plot area.
AxisSpace space a carrier for the result (null permitted).
Wiki javadoc Use textile entry format.
Add your comments here.
clearAnnotations
public void clearAnnotations ( )
Clears all the annotations and sends a PlotChangeEvent to all registered listeners.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
clearDomainAxes
public void clearDomainAxes ( )
Clears the domain axes from the plot and sends a PlotChangeEvent to all registered listeners.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
clearDomainMarkers
public void clearDomainMarkers ( )
Clears all the (foreground and background) domain markers and sends a PlotChangeEvent to all registered listeners.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
clearDomainMarkers
public void clearDomainMarkers ( int index )
Clears the (foreground and background) domain markers for a particular renderer.
Parameters
TypeNameDescription
int index the renderer index.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
clearRangeAxes
public void clearRangeAxes ( )
Clears the range axes from the plot and sends a PlotChangeEvent to all registered listeners.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
clearRangeMarkers
public void clearRangeMarkers ( )
Clears all the range markers and sends a PlotChangeEvent to all registered listeners.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
clearRangeMarkers
public void clearRangeMarkers ( int index )
Clears the (foreground and background) range markers for a particular renderer.
Parameters
TypeNameDescription
int index the renderer index.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
clone
public Object clone ( )
Returns a clone of the plot.
Overrides method in Plot
Exceptions
CloneNotSupportedException this can occur if some component of the plot cannot be cloned.
Wiki javadoc Use textile entry format.
Add your comments here.
configureDomainAxes
public void configureDomainAxes ( )
Configures the domain axes.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
configureRangeAxes
public void configureRangeAxes ( )
Configures the range axes.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
datasetChanged
public void datasetChanged ( DatasetChangeEvent event )
Receives notification of a change to the plot's dataset.

The axis ranges are updated if necessary.

Overrides method in Plot
Parameters
TypeNameDescription
DatasetChangeEvent event information about the event (not used here).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
draw
public void draw ( Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info )
Draws the plot within the specified area on a graphics device.
Overrides method in Plot
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D area the plot area (in Java2D space).
Point2D anchor an anchor point in Java2D space (null permitted).
PlotState parentState the state from the parent plot, if there is one (null permitted).
PlotRenderingInfo info collects chart drawing information (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawAnnotations
public void drawAnnotations ( Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info )
Draws the annotations for the plot.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D dataArea the data area.
PlotRenderingInfo info the chart rendering info.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawAxes
protected Map drawAxes ( Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, PlotRenderingInfo plotState )
A utility method for drawing the axes.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device (null not permitted).
Rectangle2D plotArea the plot area (null not permitted).
Rectangle2D dataArea the data area (null not permitted).
PlotRenderingInfo plotState collects information about the plot (null permitted).
Wiki javadoc Use textile entry format.
Add your comments here.
drawBackground
public void drawBackground ( Graphics2D g2, Rectangle2D area )
Draws the background for the plot.
Overrides method in Plot
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D area the area.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawDomainGridlines
protected void drawDomainGridlines ( Graphics2D g2, Rectangle2D dataArea, List ticks )
Draws the gridlines for the plot, if they are visible.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D dataArea the data area.
List ticks the ticks.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawDomainMarkers
protected void drawDomainMarkers ( Graphics2D g2, Rectangle2D dataArea, int index, Layer layer )
Draws the domain markers (if any) for an axis and layer. This method is typically called from within the draw() method.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D dataArea the data area.
int index the renderer index.
Layer layer the layer (foreground or background).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawDomainTickBands
public void drawDomainTickBands ( Graphics2D g2, Rectangle2D dataArea, List ticks )
Draws the domain tick bands, if any.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D dataArea the data area.
List ticks the ticks.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawHorizontalLine
protected void drawHorizontalLine ( Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint )
Utility method for drawing a horizontal line across the data area of the plot.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D dataArea the data area.
double value the coordinate, where to draw the line.
Stroke stroke the stroke to use.
Paint paint the paint to use.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawQuadrants
protected void drawQuadrants ( Graphics2D g2, Rectangle2D area )
Draws the quadrants.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D area the area.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawRangeGridlines
protected void drawRangeGridlines ( Graphics2D g2, Rectangle2D area, List ticks )
Draws the gridlines for the plot's primary range axis, if they are visible.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D area the data area.
List ticks the ticks.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawRangeMarkers
protected void drawRangeMarkers ( Graphics2D g2, Rectangle2D dataArea, int index, Layer layer )
Draws the range markers (if any) for a renderer and layer. This method is typically called from within the draw() method.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D dataArea the data area.
int index the renderer index.
Layer layer the layer (foreground or background).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawRangeTickBands
public void drawRangeTickBands ( Graphics2D g2, Rectangle2D dataArea, List ticks )
Draws the range tick bands, if any.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D dataArea the data area.
List ticks the ticks.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawVerticalLine
protected void drawVerticalLine ( Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint )
Utility method for drawing a vertical line on the data area of the plot.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D dataArea the data area.
double value the coordinate, where to draw the line.
Stroke stroke the stroke to use.
Paint paint the paint to use.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
drawZeroRangeBaseline
protected void drawZeroRangeBaseline ( Graphics2D g2, Rectangle2D area )
Draws a base line across the chart at value zero on the range axis.
Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D area the data area.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
equals
public boolean equals ( Object obj )
Tests this plot for equality with another object.
Overrides method in Plot
Parameters
TypeNameDescription
Object obj the object (null permitted).
Wiki javadoc Use textile entry format.
Add your comments here.
getAnnotations
public List getAnnotations ( )
Returns the list of annotations.
Since: 1.0.1
Wiki javadoc Use textile entry format.
Add your comments here.
getAxisOffset
public RectangleInsets getAxisOffset ( )
Returns the axis offset.
Wiki javadoc Use textile entry format.
Add your comments here.
getDataRange
public Range getDataRange ( ValueAxis axis )
Returns the range for the specified axis.
Implements method in ValueAxisPlot
Parameters
TypeNameDescription
ValueAxis axis the axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getDataset
public XYDataset getDataset ( )
Returns the primary dataset for the plot.
Wiki javadoc Use textile entry format.
Add your comments here.
getDataset
public XYDataset getDataset ( int index )
Returns a dataset.
Parameters
TypeNameDescription
int index the dataset index.
Wiki javadoc Use textile entry format.
Add your comments here.
getDatasetCount
public int getDatasetCount ( )
Returns the number of datasets.
Wiki javadoc Use textile entry format.
Add your comments here.
getDatasetRenderingOrder
public DatasetRenderingOrder getDatasetRenderingOrder ( )
Returns the dataset rendering order.
Wiki javadoc Use textile entry format.
Add your comments here.
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).
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainAxis
public ValueAxis getDomainAxis ( int index )
Returns a domain axis.
Parameters
TypeNameDescription
int index the axis index.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainAxisCount
public int getDomainAxisCount ( )
Returns the number of domain axes.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainAxisEdge
public RectangleEdge getDomainAxisEdge ( )
Returns the edge for the primary domain axis (taking into account the plot's orientation.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainAxisEdge
public RectangleEdge getDomainAxisEdge ( int index )
Returns the edge for a domain axis.
Parameters
TypeNameDescription
int index the axis index.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainAxisForDataset
public ValueAxis getDomainAxisForDataset ( int index )
Returns the domain axis for a dataset.
Parameters
TypeNameDescription
int index the dataset index.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainAxisIndex
protected int getDomainAxisIndex ( ValueAxis axis )
Returns the index of the given domain axis.
Parameters
TypeNameDescription
ValueAxis axis the axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainAxisLocation
public AxisLocation getDomainAxisLocation ( )
Returns the location of the primary domain axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainAxisLocation
public AxisLocation getDomainAxisLocation ( int index )
Returns the location for a domain axis. If this hasn't been set explicitly, the method returns the location that is opposite to the primary domain axis location.
Parameters
TypeNameDescription
int index the axis index.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainCrosshairPaint
public Paint getDomainCrosshairPaint ( )
Returns the domain crosshair color.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainCrosshairStroke
public Stroke getDomainCrosshairStroke ( )
Returns the Stroke used to draw the crosshair (if visible).
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainCrosshairValue
public double getDomainCrosshairValue ( )
Returns the domain crosshair value.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainGridlinePaint
public Paint getDomainGridlinePaint ( )
Returns the paint for the grid lines (if any) plotted against the domain axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainGridlineStroke
public Stroke getDomainGridlineStroke ( )
Returns the stroke for the grid-lines (if any) plotted against the domain axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainMarkers
public Collection getDomainMarkers ( Layer layer )
Returns the list of domain markers (read only) for the specified layer.
Parameters
TypeNameDescription
Layer layer the layer (foreground or background).
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainMarkers
public Collection getDomainMarkers ( int index, Layer layer )
Returns a collection of domain markers for a particular renderer and layer.
Parameters
TypeNameDescription
int index the renderer index.
Layer layer the layer.
Wiki javadoc Use textile entry format.
Add your comments here.
getDomainTickBandPaint
public Paint getDomainTickBandPaint ( )
Returns the paint used for the domain tick bands. If this is null, no tick bands will be drawn.
Wiki javadoc Use textile entry format.
Add your comments here.
getFixedDomainAxisSpace
public AxisSpace getFixedDomainAxisSpace ( )
Returns the fixed domain axis space.
Wiki javadoc Use textile entry format.
Add your comments here.
getFixedLegendItems
public LegendItemCollection getFixedLegendItems ( )
Returns the fixed legend items, if any.
Wiki javadoc Use textile entry format.
Add your comments here.
getFixedRangeAxisSpace
public AxisSpace getFixedRangeAxisSpace ( )
Returns the fixed range axis space.
Wiki javadoc Use textile entry format.
Add your comments here.
getIndexOf
public int getIndexOf ( XYItemRenderer renderer )
Returns the index of the specified renderer, or -1 if the renderer is not assigned to this plot.
Parameters
TypeNameDescription
XYItemRenderer renderer the renderer (null permitted).
Wiki javadoc Use textile entry format.
Add your comments here.
getLegendItems
public LegendItemCollection getLegendItems ( )
Returns the legend items for the plot. Each legend item is generated by the plot's renderer, since the renderer is responsible for the visual representation of the data.
Overrides method in Plot
Wiki javadoc Use textile entry format.
Add your comments here.
getOrientation
public PlotOrientation getOrientation ( )
Returns the orientation of the plot.
Implements method in Zoomable
Wiki javadoc Use textile entry format.
Add your comments here.
getPlotType
public String getPlotType ( )
Returns the plot type as a string.
Overrides method in Plot
Wiki javadoc Use textile entry format.
Add your comments here.
getQuadrantOrigin
public Point2D getQuadrantOrigin ( )
Returns the origin for the quadrants that can be displayed on the plot. This defaults to (0, 0).
Wiki javadoc Use textile entry format.
Add your comments here.
getQuadrantPaint
public Paint getQuadrantPaint ( int index )
Returns the paint used for the specified quadrant.
Parameters
TypeNameDescription
int index the quadrant index (0-3).
Wiki javadoc Use textile entry format.
Add your comments here.
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).
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeAxis
public ValueAxis getRangeAxis ( int index )
Returns a range axis.
Parameters
TypeNameDescription
int index the axis index.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeAxisCount
public int getRangeAxisCount ( )
Returns the number of range axes.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeAxisEdge
public RectangleEdge getRangeAxisEdge ( )
Returns the edge for the primary range axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeAxisEdge
public RectangleEdge getRangeAxisEdge ( int index )
Returns the edge for a range axis.
Parameters
TypeNameDescription
int index the axis index.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeAxisForDataset
public ValueAxis getRangeAxisForDataset ( int index )
Returns the range axis for a dataset.
Parameters
TypeNameDescription
int index the dataset index.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeAxisIndex
protected int getRangeAxisIndex ( ValueAxis axis )
Returns the index of the given range axis.
Parameters
TypeNameDescription
ValueAxis axis the axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeAxisLocation
public AxisLocation getRangeAxisLocation ( )
Returns the location of the primary range axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeAxisLocation
public AxisLocation getRangeAxisLocation ( int index )
Returns the location for a range axis. If this hasn't been set explicitly, the method returns the location that is opposite to the primary range axis location.
Parameters
TypeNameDescription
int index the axis index.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeCrosshairPaint
public Paint getRangeCrosshairPaint ( )
Returns the range crosshair color.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeCrosshairStroke
public Stroke getRangeCrosshairStroke ( )
Returns the Stroke used to draw the crosshair (if visible).
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeCrosshairValue
public double getRangeCrosshairValue ( )
Returns the range crosshair value.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeGridlinePaint
public Paint getRangeGridlinePaint ( )
Returns the paint for the grid lines (if any) plotted against the range axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeGridlineStroke
public Stroke getRangeGridlineStroke ( )
Returns the stroke for the grid lines (if any) plotted against the range axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeMarkers
public Collection getRangeMarkers ( Layer layer )
Returns the list of range markers (read only) for the specified layer.
Parameters
TypeNameDescription
Layer layer the layer (foreground or background).
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeMarkers
public Collection getRangeMarkers ( int index, Layer layer )
Returns a collection of range markers for a particular renderer and layer.
Parameters
TypeNameDescription
int index the renderer index.
Layer layer the layer.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeTickBandPaint
public Paint getRangeTickBandPaint ( )
Returns the paint used for the range tick bands. If this is null, no tick bands will be drawn.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeZeroBaselinePaint
public Paint getRangeZeroBaselinePaint ( )
Returns the paint for the zero baseline (if any) plotted against the range axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getRangeZeroBaselineStroke
public Stroke getRangeZeroBaselineStroke ( )
Returns the stroke used for the zero baseline against the range axis.
Wiki javadoc Use textile entry format.
Add your comments here.
getRenderer
public XYItemRenderer getRenderer ( )
Returns the renderer for the primary dataset.
Wiki javadoc Use textile entry format.
Add your comments here.
getRenderer
public XYItemRenderer getRenderer ( int index )
Returns the renderer for a dataset, or null.
Parameters
TypeNameDescription
int index the renderer index.
Wiki javadoc Use textile entry format.
Add your comments here.
getRendererForDataset
public XYItemRenderer getRendererForDataset ( XYDataset dataset )
Returns the renderer for the specified dataset. The code first determines the index of the dataset, then checks if there is a renderer with the same index (if not, the method returns renderer(0).
Parameters
TypeNameDescription
XYDataset dataset the dataset (null permitted).
Wiki javadoc Use textile entry format.
Add your comments here.
getSeriesCount
public int getSeriesCount ( )
Returns the number of series in the primary dataset for this plot. If the dataset is null, the method returns 0.
Wiki javadoc Use textile entry format.
Add your comments here.
getSeriesRenderingOrder
public SeriesRenderingOrder getSeriesRenderingOrder ( )
Returns the series rendering order.
Wiki javadoc Use textile entry format.
Add your comments here.
getWeight
public int getWeight ( )
Returns the weight for this plot when it is used as a subplot within a combined plot.
Wiki javadoc Use textile entry format.
Add your comments here.
handleClick
public void handleClick ( int x, int y, PlotRenderingInfo info )
Handles a 'click' on the plot by updating the anchor values...
Overrides method in Plot
Parameters
TypeNameDescription
int x the x-coordinate, where the click occurred, in Java2D space.
int y the y-coordinate, where the click occurred, in Java2D space.
PlotRenderingInfo info object containing information about the plot dimensions.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
indexOf
public int indexOf ( XYDataset dataset )
Returns the index of the specified dataset, or -1 if the dataset does not belong to the plot.
Parameters
TypeNameDescription
XYDataset dataset the dataset (null not permitted).
Wiki javadoc Use textile entry format.
Add your comments here.
isDomainCrosshairLockedOnData
public boolean isDomainCrosshairLockedOnData ( )
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
Wiki javadoc Use textile entry format.
Add your comments here.
isDomainCrosshairVisible
public boolean isDomainCrosshairVisible ( )
Returns a flag indicating whether or not the domain crosshair is visible.
Wiki javadoc Use textile entry format.
Add your comments here.
isDomainGridlinesVisible
public boolean isDomainGridlinesVisible ( )
Returns true if the domain gridlines are visible, and false otherwise.
Wiki javadoc Use textile entry format.
Add your comments here.
isDomainZoomable
public boolean isDomainZoomable ( )
Returns true
Implements method in Zoomable
Wiki javadoc Use textile entry format.
Add your comments here.
isRangeCrosshairLockedOnData
public boolean isRangeCrosshairLockedOnData ( )
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
Wiki javadoc Use textile entry format.
Add your comments here.
isRangeCrosshairVisible
public boolean isRangeCrosshairVisible ( )
Returns a flag indicating whether or not the range crosshair is visible.
Wiki javadoc Use textile entry format.
Add your comments here.
isRangeGridlinesVisible
public boolean isRangeGridlinesVisible ( )
Returns true if the range axis grid is visible, and false otherwise.
Wiki javadoc Use textile entry format.
Add your comments here.
isRangeZeroBaselineVisible
public boolean isRangeZeroBaselineVisible ( )
Returns a flag that controls whether or not a zero baseline is displayed for the range axis.
Wiki javadoc Use textile entry format.
Add your comments here.
isRangeZoomable
public boolean isRangeZoomable ( )
Returns true
Implements method in Zoomable
Wiki javadoc Use textile entry format.
Add your comments here.
mapDatasetToDomainAxis
public void mapDatasetToDomainAxis ( int index, int axisIndex )
Maps a dataset to a particular domain axis. All data will be plotted against axis zero by default, no mapping is required for this case.
Parameters
TypeNameDescription
int index the dataset index (zero-based).
int axisIndex the axis index.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
mapDatasetToRangeAxis
public void mapDatasetToRangeAxis ( int index, int axisIndex )
Maps a dataset to a particular range axis. All data will be plotted against axis zero by default, no mapping is required for this case.
Parameters
TypeNameDescription
int index the dataset index (zero-based).
int axisIndex the axis index.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
removeAnnotation
public boolean removeAnnotation ( XYAnnotation annotation )
Removes an annotation from the plot and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
XYAnnotation annotation the annotation (null not permitted).
Wiki javadoc Use textile entry format.
Add your comments here.
render
public boolean render ( Graphics2D g2, Rectangle2D dataArea, int index, PlotRenderingInfo info, CrosshairState crosshairState )
Draws a representation of the data within the dataArea region, using the current renderer.

The info and crosshairState arguments may be null.

Parameters
TypeNameDescription
Graphics2D g2 the graphics device.
Rectangle2D dataArea the region in which the data is to be drawn.
int index the dataset index.
PlotRenderingInfo info an optional object for collection dimension information.
CrosshairState crosshairState collects crosshair information (null permitted).
Wiki javadoc Use textile entry format.
Add your comments here.
rendererChanged
public void rendererChanged ( RendererChangeEvent event )
Receives notification of a renderer change event.
Implements method in RendererChangeListener
Parameters
TypeNameDescription
RendererChangeEvent event the event.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setAxisOffset
public void setAxisOffset ( RectangleInsets offset )
Sets the axis offsets (gap between the data area and the axes).
Parameters
TypeNameDescription
RectangleInsets offset the offset (null not permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDataset
public void setDataset ( XYDataset dataset )
Sets the primary dataset for the plot, replacing the existing dataset if there is one.
Parameters
TypeNameDescription
XYDataset dataset the dataset (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDataset
public void setDataset ( int index, XYDataset dataset )
Sets a dataset for the plot.
Parameters
TypeNameDescription
int index the dataset index.
XYDataset dataset the dataset (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDatasetRenderingOrder
public void setDatasetRenderingOrder ( DatasetRenderingOrder order )
Sets the rendering order and sends a PlotChangeEvent to all registered listeners. By default, the plot renders the primary dataset last (so that the primary dataset overlays the secondary datasets). You can reverse this if you want to.
Parameters
TypeNameDescription
DatasetRenderingOrder order the rendering order (null not permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainAxes
public void setDomainAxes ( ValueAxis [] axes )
Sets the domain axes for this plot and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
ValueAxis [] axes the axes.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainAxis
public void setDomainAxis ( ValueAxis axis )
Sets the domain axis for the plot and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
ValueAxis axis the new axis (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainAxis
public void setDomainAxis ( int index, ValueAxis axis )
Sets a domain axis and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
int index the axis index.
ValueAxis axis the axis.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainAxis
public void setDomainAxis ( int index, ValueAxis axis, boolean notify )
Sets a domain axis and, if requested, sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
int index the axis index.
ValueAxis axis the axis.
boolean notify notify listeners?
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainAxisLocation
public void setDomainAxisLocation ( AxisLocation location )
Sets the location of the domain axis and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
AxisLocation location the location (null not permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainAxisLocation
public void setDomainAxisLocation ( AxisLocation location, boolean notify )
Sets the location of the domain axis and, if requested, sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
AxisLocation location the location (null not permitted).
boolean notify notify listeners?
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainAxisLocation
public void setDomainAxisLocation ( int index, AxisLocation location )
Sets the location for a domain axis and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
int index the axis index.
AxisLocation location the location (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainCrosshairLockedOnData
public void setDomainCrosshairLockedOnData ( boolean flag )
Sets the flag indicating whether or not the domain crosshair should "lock-on" to actual data values.
Parameters
TypeNameDescription
boolean flag the flag.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainCrosshairPaint
public void setDomainCrosshairPaint ( Paint paint )
Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
Parameters
TypeNameDescription
Paint paint the new crosshair paint.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainCrosshairStroke
public void setDomainCrosshairStroke ( Stroke stroke )
Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
Parameters
TypeNameDescription
Stroke stroke the new crosshair stroke.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainCrosshairValue
public void setDomainCrosshairValue ( double value )
Sets the domain crosshair value and sends a PlotChangeEvent to all registered listeners (provided that the domain crosshair is visible).
Parameters
TypeNameDescription
double value the value.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainCrosshairValue
public void setDomainCrosshairValue ( double value, boolean notify )
Sets the domain crosshair value and, if requested, sends a PlotChangeEvent to all registered listeners (provided that the domain crosshair is visible).
Parameters
TypeNameDescription
double value the new value.
boolean notify notify listeners?
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainCrosshairVisible
public void setDomainCrosshairVisible ( boolean flag )
Sets the flag indicating whether or not the domain crosshair is visible.
Parameters
TypeNameDescription
boolean flag the new value of the flag.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainGridlinePaint
public void setDomainGridlinePaint ( Paint paint )
Sets the paint for the grid lines plotted against the domain axis.

If you set this to null, no grid lines will be drawn.

Parameters
TypeNameDescription
Paint paint the paint (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainGridlineStroke
public void setDomainGridlineStroke ( Stroke stroke )
Sets the stroke for the grid lines plotted against the domain axis.

If you set this to null, no grid lines will be drawn.

Parameters
TypeNameDescription
Stroke stroke the stroke (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainGridlinesVisible
public void setDomainGridlinesVisible ( boolean visible )
Sets the flag that controls whether or not the domain grid-lines are visible.

If the flag value is changed, a PlotChangeEvent is sent to all registered listeners.

Parameters
TypeNameDescription
boolean visible the new value of the flag.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setDomainTickBandPaint
public void setDomainTickBandPaint ( Paint paint )
Sets the paint for the domain tick bands.
Parameters
TypeNameDescription
Paint paint the paint (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setFixedDomainAxisSpace
public void setFixedDomainAxisSpace ( AxisSpace space )
Sets the fixed domain axis space.
Parameters
TypeNameDescription
AxisSpace space the space.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setFixedLegendItems
public void setFixedLegendItems ( LegendItemCollection items )
Sets the fixed legend items for the plot. Leave this set to null if you prefer the legend items to be created automatically.
Parameters
TypeNameDescription
LegendItemCollection items the legend items (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setFixedRangeAxisSpace
public void setFixedRangeAxisSpace ( AxisSpace space )
Sets the fixed range axis space.
Parameters
TypeNameDescription
AxisSpace space the space.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setOrientation
public void setOrientation ( PlotOrientation orientation )
Sets the orientation for the plot.
Parameters
TypeNameDescription
PlotOrientation orientation the orientation (null not allowed).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setQuadrantOrigin
public void setQuadrantOrigin ( Point2D origin )
Sets the quadrant origin and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
Point2D origin the origin (null not permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setQuadrantPaint
public void setQuadrantPaint ( int index, Paint paint )
Sets the paint used for the specified quadrant and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
int index the quadrant index (0-3).
Paint paint the paint (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeAxes
public void setRangeAxes ( ValueAxis [] axes )
Sets the range axes for this plot and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
ValueAxis [] axes the axes.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeAxis
public void setRangeAxis ( ValueAxis axis )
Sets the range axis for the plot and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
ValueAxis axis the axis (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeAxis
public void setRangeAxis ( int index, ValueAxis axis )
Sets a range axis and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
int index the axis index.
ValueAxis axis the axis (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeAxis
public void setRangeAxis ( int index, ValueAxis axis, boolean notify )
Sets a range axis and, if requested, sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
int index the axis index.
ValueAxis axis the axis (null permitted).
boolean notify No description provided.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeAxisLocation
public void setRangeAxisLocation ( AxisLocation location )
Sets the location of the primary range axis and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
AxisLocation location the location (null not permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeAxisLocation
public void setRangeAxisLocation ( AxisLocation location, boolean notify )
Sets the location of the primary range axis and, if requested, sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
AxisLocation location the location (null not permitted).
boolean notify notify listeners?
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeAxisLocation
public void setRangeAxisLocation ( int index, AxisLocation location )
Sets the location for a range axis and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
int index the axis index.
AxisLocation location the location (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeCrosshairLockedOnData
public void setRangeCrosshairLockedOnData ( boolean flag )
Sets the flag indicating whether or not the range crosshair should "lock-on" to actual data values.
Parameters
TypeNameDescription
boolean flag the flag.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeCrosshairPaint
public void setRangeCrosshairPaint ( Paint paint )
Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
Parameters
TypeNameDescription
Paint paint the new crosshair paint.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeCrosshairStroke
public void setRangeCrosshairStroke ( Stroke stroke )
Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
Parameters
TypeNameDescription
Stroke stroke the new crosshair stroke.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeCrosshairValue
public void setRangeCrosshairValue ( double value )
Sets the domain crosshair value.

Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.

Parameters
TypeNameDescription
double value the new value.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeCrosshairValue
public void setRangeCrosshairValue ( double value, boolean notify )
Sets the range crosshair value.

Registered listeners are notified that the axis has been modified, but only if the crosshair is visible.

Parameters
TypeNameDescription
double value the new value.
boolean notify a flag that controls whether or not listeners are notified.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeCrosshairVisible
public void setRangeCrosshairVisible ( boolean flag )
Sets the flag indicating whether or not the range crosshair is visible.
Parameters
TypeNameDescription
boolean flag the new value of the flag.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeGridlinePaint
public void setRangeGridlinePaint ( Paint paint )
Sets the paint for the grid lines plotted against the range axis and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
Paint paint the paint (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeGridlineStroke
public void setRangeGridlineStroke ( Stroke stroke )
Sets the stroke for the grid lines plotted against the range axis, and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
Stroke stroke the stroke (null not permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeGridlinesVisible
public void setRangeGridlinesVisible ( boolean visible )
Sets the flag that controls whether or not the range axis grid lines are visible.

If the flag value is changed, a PlotChangeEvent is sent to all registered listeners.

Parameters
TypeNameDescription
boolean visible the new value of the flag.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeTickBandPaint
public void setRangeTickBandPaint ( Paint paint )
Sets the paint for the range tick bands.
Parameters
TypeNameDescription
Paint paint the paint (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeZeroBaselinePaint
public void setRangeZeroBaselinePaint ( Paint paint )
Sets the paint for the zero baseline plotted against the range axis and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
Paint paint the paint (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeZeroBaselineStroke
public void setRangeZeroBaselineStroke ( Stroke stroke )
Sets the stroke for the zero baseline for the range axis, and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
Stroke stroke the stroke (null not permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRangeZeroBaselineVisible
public void setRangeZeroBaselineVisible ( boolean visible )
Sets the flag that controls whether or not the zero baseline is displayed for the range axis, and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
boolean visible the flag.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRenderer
public void setRenderer ( XYItemRenderer renderer )
Sets the renderer for the primary dataset and sends a PlotChangeEvent to all registered listeners. If the renderer is set to null, no data will be displayed.
Parameters
TypeNameDescription
XYItemRenderer renderer the renderer (null permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRenderer
public void setRenderer ( int index, XYItemRenderer renderer )
Sets a renderer and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
int index the index.
XYItemRenderer renderer the renderer.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRenderer
public void setRenderer ( int index, XYItemRenderer renderer, boolean notify )
Sets a renderer and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
int index the index.
XYItemRenderer renderer the renderer.
boolean notify notify listeners?
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setRenderers
public void setRenderers ( XYItemRenderer [] renderers )
Sets the renderers for this plot and sends a PlotChangeEvent to all registered listeners.
Parameters
TypeNameDescription
XYItemRenderer [] renderers the renderers.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setSeriesRenderingOrder
public void setSeriesRenderingOrder ( SeriesRenderingOrder order )
Sets the series order and sends a PlotChangeEvent to all registered listeners. By default, the plot renders the primary series last (so that the primary series appears to be on top). You can reverse this if you want to.
Parameters
TypeNameDescription
SeriesRenderingOrder order the rendering order (null not permitted).
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setWeight
public void setWeight ( int weight )
Sets the weight for the plot.
Parameters
TypeNameDescription
int weight the weight.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
zoomDomainAxes
public void zoomDomainAxes ( double factor, PlotRenderingInfo info, Point2D source )
Multiplies the range on the domain axis/axes by the specified factor.
Implements method in Zoomable
Parameters
TypeNameDescription
double factor the zoom factor.
PlotRenderingInfo info the plot rendering info.
Point2D source the source point.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
zoomDomainAxes
public void zoomDomainAxes ( double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source )
Zooms in on the domain axis/axes. The new lower and upper bounds are specified as percentages of the current axis range, where 0 percent is the current lower bound and 100 percent is the current upper bound.
Implements method in Zoomable
Parameters
TypeNameDescription
double lowerPercent a percentage that determines the new lower bound for the axis (e.g. 0.20 is twenty percent).
double upperPercent a percentage that determines the new upper bound for the axis (e.g. 0.80 is eighty percent).
PlotRenderingInfo info the plot rendering info.
Point2D source the source point.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
zoomRangeAxes
public void zoomRangeAxes ( double factor, PlotRenderingInfo info, Point2D source )
Multiplies the range on the range axis/axes by the specified factor.
Implements method in Zoomable
Parameters
TypeNameDescription
double factor the zoom factor.
PlotRenderingInfo info the plot rendering info.
Point2D source the source point.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
zoomRangeAxes
public void zoomRangeAxes ( double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source )
Zooms in on the range axes.
Implements method in Zoomable
Parameters
TypeNameDescription
double lowerPercent the lower bound.
double upperPercent the upper bound.
PlotRenderingInfo info the plot rendering info.
Point2D source the source point.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.