org.jfree.chart.plot

Class XYPlot

public class XYPlot extends Plot implements ValueAxisPlot, Zoomable, RendererChangeListener, Cloneable, PublicCloneable, Serializable

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.

Field Summary
static PaintDEFAULT_CROSSHAIR_PAINT
The default crosshair paint.
static StrokeDEFAULT_CROSSHAIR_STROKE
The default crosshair stroke.
static booleanDEFAULT_CROSSHAIR_VISIBLE
The default crosshair visibility.
static PaintDEFAULT_GRIDLINE_PAINT
The default grid line paint.
static StrokeDEFAULT_GRIDLINE_STROKE
The default grid line stroke.
protected static ResourceBundlelocalizationResources
The resourceBundle for the localization.
Constructor Summary
XYPlot()
Creates a new XYPlot instance with no dataset, no axes and no renderer.
XYPlot(XYDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, XYItemRenderer renderer)
Creates a new plot with the specified dataset, axes and renderer.
Method Summary
voidaddAnnotation(XYAnnotation annotation)
Adds an annotation to the plot and sends a PlotChangeEvent to all registered listeners.
voidaddAnnotation(XYAnnotation annotation, boolean notify)
Adds an annotation to the plot and, if requested, sends a PlotChangeEvent to all registered listeners.
voidaddDomainMarker(Marker marker)
Adds a marker for the domain axis and sends a PlotChangeEvent to all registered listeners.
voidaddDomainMarker(Marker marker, Layer layer)
Adds a marker for the domain axis in the specified layer and sends a PlotChangeEvent to all registered listeners.
voidaddDomainMarker(int index, Marker marker, Layer layer)
Adds a marker for a specific dataset/renderer and sends a PlotChangeEvent to all registered listeners.
voidaddDomainMarker(int index, Marker marker, Layer layer, boolean notify)
Adds a marker for a specific dataset/renderer and, if requested, sends a PlotChangeEvent to all registered listeners.
voidaddRangeMarker(Marker marker)
Adds a marker for the range axis and sends a PlotChangeEvent to all registered listeners.
voidaddRangeMarker(Marker marker, Layer layer)
Adds a marker for the range axis in the specified layer and sends a PlotChangeEvent to all registered listeners.
voidaddRangeMarker(int index, Marker marker, Layer layer)
Adds a marker for a specific dataset/renderer and sends a PlotChangeEvent to all registered listeners.
voidaddRangeMarker(int index, Marker marker, Layer layer, boolean notify)
Adds a marker for a specific dataset/renderer and, if requested, sends a PlotChangeEvent to all registered listeners.
protected AxisSpacecalculateAxisSpace(Graphics2D g2, Rectangle2D plotArea)
Calculates the space required for all the axes in the plot.
protected AxisSpacecalculateDomainAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space)
Calculates the space required for the domain axis/axes.
protected AxisSpacecalculateRangeAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space)
Calculates the space required for the range axis/axes.
voidclearAnnotations()
Clears all the annotations and sends a PlotChangeEvent to all registered listeners.
voidclearDomainAxes()
Clears the domain axes from the plot and sends a PlotChangeEvent to all registered listeners.
voidclearDomainMarkers()
Clears all the (foreground and background) domain markers and sends a PlotChangeEvent to all registered listeners.
voidclearDomainMarkers(int index)
Clears the (foreground and background) domain markers for a particular renderer.
voidclearRangeAxes()
Clears the range axes from the plot and sends a PlotChangeEvent to all registered listeners.
voidclearRangeMarkers()
Clears all the range markers and sends a PlotChangeEvent to all registered listeners.
voidclearRangeMarkers(int index)
Clears the (foreground and background) range markers for a particular renderer.
Objectclone()
Returns a clone of the plot.
voidconfigureDomainAxes()
Configures the domain axes.
voidconfigureRangeAxes()
Configures the range axes.
voiddatasetChanged(DatasetChangeEvent event)
Receives notification of a change to the plot's dataset.
voiddraw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
Draws the plot within the specified area on a graphics device.
voiddrawAnnotations(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info)
Draws the annotations for the plot.
protected MapdrawAxes(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, PlotRenderingInfo plotState)
A utility method for drawing the axes.
voiddrawBackground(Graphics2D g2, Rectangle2D area)
Draws the background for the plot.
protected voiddrawDomainCrosshair(Graphics2D g2, Rectangle2D dataArea, PlotOrientation orientation, double value, ValueAxis axis, Stroke stroke, Paint paint)
Draws a domain crosshair.
protected voiddrawDomainGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the gridlines for the plot, if they are visible.
protected voiddrawDomainMarkers(Graphics2D g2, Rectangle2D dataArea, int index, Layer layer)
Draws the domain markers (if any) for an axis and layer.
voiddrawDomainTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the domain tick bands, if any.
protected voiddrawHorizontalLine(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 voiddrawQuadrants(Graphics2D g2, Rectangle2D area)
Draws the quadrants.
protected voiddrawRangeCrosshair(Graphics2D g2, Rectangle2D dataArea, PlotOrientation orientation, double value, ValueAxis axis, Stroke stroke, Paint paint)
Draws a range crosshair.
protected voiddrawRangeGridlines(Graphics2D g2, Rectangle2D area, List ticks)
Draws the gridlines for the plot's primary range axis, if they are visible.
protected voiddrawRangeMarkers(Graphics2D g2, Rectangle2D dataArea, int index, Layer layer)
Draws the range markers (if any) for a renderer and layer.
voiddrawRangeTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the range tick bands, if any.
protected voiddrawVerticalLine(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 voiddrawZeroDomainBaseline(Graphics2D g2, Rectangle2D area)
Draws a base line across the chart at value zero on the domain axis.
protected voiddrawZeroRangeBaseline(Graphics2D g2, Rectangle2D area)
Draws a base line across the chart at value zero on the range axis.
booleanequals(Object obj)
Tests this plot for equality with another object.
ListgetAnnotations()
Returns the list of annotations.
RectangleInsetsgetAxisOffset()
Returns the axis offset.
RangegetDataRange(ValueAxis axis)
Returns the range for the specified axis.
XYDatasetgetDataset()
Returns the primary dataset for the plot.
XYDatasetgetDataset(int index)
Returns a dataset.
intgetDatasetCount()
Returns the number of datasets.
DatasetRenderingOrdergetDatasetRenderingOrder()
Returns the dataset rendering order.
ValueAxisgetDomainAxis()
Returns the domain axis with index 0.
ValueAxisgetDomainAxis(int index)
Returns the domain axis with the specified index, or null.
intgetDomainAxisCount()
Returns the number of domain axes.
RectangleEdgegetDomainAxisEdge()
Returns the edge for the primary domain axis (taking into account the plot's orientation).
RectangleEdgegetDomainAxisEdge(int index)
Returns the edge for a domain axis.
ValueAxisgetDomainAxisForDataset(int index)
Returns the domain axis for a dataset.
intgetDomainAxisIndex(ValueAxis axis)
Returns the index of the given domain axis.
AxisLocationgetDomainAxisLocation()
Returns the location of the primary domain axis.
AxisLocationgetDomainAxisLocation(int index)
Returns the location for a domain axis.
PaintgetDomainCrosshairPaint()
Returns the domain crosshair paint.
StrokegetDomainCrosshairStroke()
Returns the Stroke used to draw the crosshair (if visible).
doublegetDomainCrosshairValue()
Returns the domain crosshair value.
PaintgetDomainGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the domain axis.
StrokegetDomainGridlineStroke()
Returns the stroke for the grid-lines (if any) plotted against the domain axis.
CollectiongetDomainMarkers(Layer layer)
Returns the list of domain markers (read only) for the specified layer.
CollectiongetDomainMarkers(int index, Layer layer)
Returns a collection of domain markers for a particular renderer and layer.
PaintgetDomainTickBandPaint()
Returns the paint used for the domain tick bands.
PaintgetDomainZeroBaselinePaint()
Returns the paint for the zero baseline (if any) plotted against the domain axis.
StrokegetDomainZeroBaselineStroke()
Returns the stroke used for the zero baseline against the domain axis.
AxisSpacegetFixedDomainAxisSpace()
Returns the fixed domain axis space.
LegendItemCollectiongetFixedLegendItems()
Returns the fixed legend items, if any.
AxisSpacegetFixedRangeAxisSpace()
Returns the fixed range axis space.
intgetIndexOf(XYItemRenderer renderer)
Returns the index of the specified renderer, or -1 if the renderer is not assigned to this plot.
LegendItemCollectiongetLegendItems()
Returns the legend items for the plot.
PlotOrientationgetOrientation()
Returns the orientation of the plot.
StringgetPlotType()
Returns the plot type as a string.
Point2DgetQuadrantOrigin()
Returns the origin for the quadrants that can be displayed on the plot.
PaintgetQuadrantPaint(int index)
Returns the paint used for the specified quadrant.
ValueAxisgetRangeAxis()
Returns the range axis for the plot.
ValueAxisgetRangeAxis(int index)
Returns a range axis.
intgetRangeAxisCount()
Returns the number of range axes.
RectangleEdgegetRangeAxisEdge()
Returns the edge for the primary range axis.
RectangleEdgegetRangeAxisEdge(int index)
Returns the edge for a range axis.
ValueAxisgetRangeAxisForDataset(int index)
Returns the range axis for a dataset.
intgetRangeAxisIndex(ValueAxis axis)
Returns the index of the given range axis.
AxisLocationgetRangeAxisLocation()
Returns the location of the primary range axis.
AxisLocationgetRangeAxisLocation(int index)
Returns the location for a range axis.
PaintgetRangeCrosshairPaint()
Returns the range crosshair paint.
StrokegetRangeCrosshairStroke()
Returns the stroke used to draw the crosshair (if visible).
doublegetRangeCrosshairValue()
Returns the range crosshair value.
PaintgetRangeGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the range axis.
StrokegetRangeGridlineStroke()
Returns the stroke for the grid lines (if any) plotted against the range axis.
CollectiongetRangeMarkers(Layer layer)
Returns the list of range markers (read only) for the specified layer.
CollectiongetRangeMarkers(int index, Layer layer)
Returns a collection of range markers for a particular renderer and layer.
PaintgetRangeTickBandPaint()
Returns the paint used for the range tick bands.
PaintgetRangeZeroBaselinePaint()
Returns the paint for the zero baseline (if any) plotted against the range axis.
StrokegetRangeZeroBaselineStroke()
Returns the stroke used for the zero baseline against the range axis.
XYItemRenderergetRenderer()
Returns the renderer for the primary dataset.
XYItemRenderergetRenderer(int index)
Returns the renderer for a dataset, or null.
XYItemRenderergetRendererForDataset(XYDataset dataset)
Returns the renderer for the specified dataset.
intgetSeriesCount()
Returns the number of series in the primary dataset for this plot.
SeriesRenderingOrdergetSeriesRenderingOrder()
Returns the series rendering order.
intgetWeight()
Returns the weight for this plot when it is used as a subplot within a combined plot.
voidhandleClick(int x, int y, PlotRenderingInfo info)
Handles a 'click' on the plot by updating the anchor values.
intindexOf(XYDataset dataset)
Returns the index of the specified dataset, or -1 if the dataset does not belong to the plot.
booleanisDomainCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
booleanisDomainCrosshairVisible()
Returns a flag indicating whether or not the domain crosshair is visible.
booleanisDomainGridlinesVisible()
Returns true if the domain gridlines are visible, and false otherwise.
booleanisDomainZeroBaselineVisible()
Returns a flag that controls whether or not a zero baseline is displayed for the domain axis.
booleanisDomainZoomable()
Returns true, indicating that the domain axis/axes for this plot are zoomable.
booleanisRangeCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
booleanisRangeCrosshairVisible()
Returns a flag indicating whether or not the range crosshair is visible.
booleanisRangeGridlinesVisible()
Returns true if the range axis grid is visible, and false otherwise.
booleanisRangeZeroBaselineVisible()
Returns a flag that controls whether or not a zero baseline is displayed for the range axis.
booleanisRangeZoomable()
Returns true, indicating that the range axis/axes for this plot are zoomable.
voidmapDatasetToDomainAxis(int index, int axisIndex)
Maps a dataset to a particular domain axis.
voidmapDatasetToRangeAxis(int index, int axisIndex)
Maps a dataset to a particular range axis.
booleanremoveAnnotation(XYAnnotation annotation)
Removes an annotation from the plot and sends a PlotChangeEvent to all registered listeners.
booleanremoveAnnotation(XYAnnotation annotation, boolean notify)
Removes an annotation from the plot and sends a PlotChangeEvent to all registered listeners.
booleanremoveDomainMarker(Marker marker)
Removes a marker for the domain axis and sends a PlotChangeEvent to all registered listeners.
booleanremoveDomainMarker(Marker marker, Layer layer)
Removes a marker for the domain axis in the specified layer and sends a PlotChangeEvent to all registered listeners.
booleanremoveDomainMarker(int index, Marker marker, Layer layer)
Removes a marker for a specific dataset/renderer and sends a PlotChangeEvent to all registered listeners.
booleanremoveDomainMarker(int index, Marker marker, Layer layer, boolean notify)
Removes a marker for a specific dataset/renderer and, if requested, sends a PlotChangeEvent to all registered listeners.
booleanremoveRangeMarker(Marker marker)
Removes a marker for the range axis and sends a PlotChangeEvent to all registered listeners.
booleanremoveRangeMarker(Marker marker, Layer layer)
Removes a marker for the range axis in the specified layer and sends a PlotChangeEvent to all registered listeners.
booleanremoveRangeMarker(int index, Marker marker, Layer layer)
Removes a marker for a specific dataset/renderer and sends a PlotChangeEvent to all registered listeners.
booleanremoveRangeMarker(int index, Marker marker, Layer layer, boolean notify)
Removes a marker for a specific dataset/renderer and sends a PlotChangeEvent to all registered listeners.
booleanrender(Graphics2D g2, Rectangle2D dataArea, int index, PlotRenderingInfo info, CrosshairState crosshairState)
Draws a representation of the data within the dataArea region, using the current renderer.
voidrendererChanged(RendererChangeEvent event)
Receives notification of a renderer change event.
voidsetAxisOffset(RectangleInsets offset)
Sets the axis offsets (gap between the data area and the axes) and sends a PlotChangeEvent to all registered listeners.
voidsetDataset(XYDataset dataset)
Sets the primary dataset for the plot, replacing the existing dataset if there is one.
voidsetDataset(int index, XYDataset dataset)
Sets a dataset for the plot.
voidsetDatasetRenderingOrder(DatasetRenderingOrder order)
Sets the rendering order and sends a PlotChangeEvent to all registered listeners.
voidsetDomainAxes(ValueAxis[] axes)
Sets the domain axes for this plot and sends a PlotChangeEvent to all registered listeners.
voidsetDomainAxis(ValueAxis axis)
Sets the domain axis for the plot and sends a PlotChangeEvent to all registered listeners.
voidsetDomainAxis(int index, ValueAxis axis)
Sets a domain axis and sends a PlotChangeEvent to all registered listeners.
voidsetDomainAxis(int index, ValueAxis axis, boolean notify)
Sets a domain axis and, if requested, sends a PlotChangeEvent to all registered listeners.
voidsetDomainAxisLocation(AxisLocation location)
Sets the location of the primary domain axis and sends a PlotChangeEvent to all registered listeners.
voidsetDomainAxisLocation(AxisLocation location, boolean notify)
Sets the location of the domain axis and, if requested, sends a PlotChangeEvent to all registered listeners.
voidsetDomainAxisLocation(int index, AxisLocation location)
Sets the location for a domain axis and sends a PlotChangeEvent to all registered listeners.
voidsetDomainAxisLocation(int index, AxisLocation location, boolean notify)
Sets the axis location for a domain axis and, if requested, sends a PlotChangeEvent to all registered listeners.
voidsetDomainCrosshairLockedOnData(boolean flag)
Sets the flag indicating whether or not the domain crosshair should "lock-on" to actual data values.
voidsetDomainCrosshairPaint(Paint paint)
Sets the paint used to draw the crosshairs (if visible) and sends a PlotChangeEvent to all registered listeners.
voidsetDomainCrosshairStroke(Stroke stroke)
Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
voidsetDomainCrosshairValue(double value)
Sets the domain crosshair value and sends a PlotChangeEvent to all registered listeners (provided that the domain crosshair is visible).
voidsetDomainCrosshairValue(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).
voidsetDomainCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the domain crosshair is visible and, if the flag changes, sends a PlotChangeEvent to all registered listeners.
voidsetDomainGridlinePaint(Paint paint)
Sets the paint for the grid lines plotted against the domain axis, and sends a PlotChangeEvent to all registered listeners.
voidsetDomainGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the domain grid-lines are visible.
voidsetDomainGridlineStroke(Stroke stroke)
Sets the stroke for the grid lines plotted against the domain axis, and sends a PlotChangeEvent to all registered listeners.
voidsetDomainTickBandPaint(Paint paint)
Sets the paint for the domain tick bands.
voidsetDomainZeroBaselinePaint(Paint paint)
Sets the paint for the zero baseline plotted against the domain axis and sends a PlotChangeEvent to all registered listeners.
voidsetDomainZeroBaselineStroke(Stroke stroke)
Sets the stroke for the zero baseline for the domain axis, and sends a PlotChangeEvent to all registered listeners.
voidsetDomainZeroBaselineVisible(boolean visible)
Sets the flag that controls whether or not the zero baseline is displayed for the domain axis, and sends a PlotChangeEvent to all registered listeners.
voidsetFixedDomainAxisSpace(AxisSpace space)
Sets the fixed domain axis space and sends a PlotChangeEvent to all registered listeners.
voidsetFixedDomainAxisSpace(AxisSpace space, boolean notify)
Sets the fixed domain axis space and, if requested, sends a PlotChangeEvent to all registered listeners.
voidsetFixedLegendItems(LegendItemCollection items)
Sets the fixed legend items for the plot.
voidsetFixedRangeAxisSpace(AxisSpace space)
Sets the fixed range axis space and sends a PlotChangeEvent to all registered listeners.
voidsetFixedRangeAxisSpace(AxisSpace space, boolean notify)
Sets the fixed range axis space and, if requested, sends a PlotChangeEvent to all registered listeners.
voidsetOrientation(PlotOrientation orientation)
Sets the orientation for the plot and sends a PlotChangeEvent to all registered listeners.
voidsetQuadrantOrigin(Point2D origin)
Sets the quadrant origin and sends a PlotChangeEvent to all registered listeners.
voidsetQuadrantPaint(int index, Paint paint)
Sets the paint used for the specified quadrant and sends a PlotChangeEvent to all registered listeners.
voidsetRangeAxes(ValueAxis[] axes)
Sets the range axes for this plot and sends a PlotChangeEvent to all registered listeners.
voidsetRangeAxis(ValueAxis axis)
Sets the range axis for the plot and sends a PlotChangeEvent to all registered listeners.
voidsetRangeAxis(int index, ValueAxis axis)
Sets a range axis and sends a PlotChangeEvent to all registered listeners.
voidsetRangeAxis(int index, ValueAxis axis, boolean notify)
Sets a range axis and, if requested, sends a PlotChangeEvent to all registered listeners.
voidsetRangeAxisLocation(AxisLocation location)
Sets the location of the primary range axis and sends a PlotChangeEvent to all registered listeners.
voidsetRangeAxisLocation(AxisLocation location, boolean notify)
Sets the location of the primary range axis and, if requested, sends a PlotChangeEvent to all registered listeners.
voidsetRangeAxisLocation(int index, AxisLocation location)
Sets the location for a range axis and sends a PlotChangeEvent to all registered listeners.
voidsetRangeAxisLocation(int index, AxisLocation location, boolean notify)
Sets the axis location for a domain axis and, if requested, sends a PlotChangeEvent to all registered listeners.
voidsetRangeCrosshairLockedOnData(boolean flag)
Sets the flag indicating whether or not the range crosshair should "lock-on" to actual data values.
voidsetRangeCrosshairPaint(Paint paint)
Sets the paint used to color the crosshairs (if visible) and sends a PlotChangeEvent to all registered listeners.
voidsetRangeCrosshairStroke(Stroke stroke)
Sets the stroke used to draw the crosshairs (if visible) and sends a PlotChangeEvent to all registered listeners.
voidsetRangeCrosshairValue(double value)
Sets the range crosshair value.
voidsetRangeCrosshairValue(double value, boolean notify)
Sets the range crosshair value and sends a PlotChangeEvent to all registered listeners, but only if the crosshair is visible.
voidsetRangeCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the range crosshair is visible.
voidsetRangeGridlinePaint(Paint paint)
Sets the paint for the grid lines plotted against the range axis and sends a PlotChangeEvent to all registered listeners.
voidsetRangeGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the range axis grid lines are visible.
voidsetRangeGridlineStroke(Stroke stroke)
Sets the stroke for the grid lines plotted against the range axis, and sends a PlotChangeEvent to all registered listeners.
voidsetRangeTickBandPaint(Paint paint)
Sets the paint for the range tick bands.
voidsetRangeZeroBaselinePaint(Paint paint)
Sets the paint for the zero baseline plotted against the range axis and sends a PlotChangeEvent to all registered listeners.
voidsetRangeZeroBaselineStroke(Stroke stroke)
Sets the stroke for the zero baseline for the range axis, and sends a PlotChangeEvent to all registered listeners.
voidsetRangeZeroBaselineVisible(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.
voidsetRenderer(XYItemRenderer renderer)
Sets the renderer for the primary dataset and sends a PlotChangeEvent to all registered listeners.
voidsetRenderer(int index, XYItemRenderer renderer)
Sets a renderer and sends a PlotChangeEvent to all registered listeners.
voidsetRenderer(int index, XYItemRenderer renderer, boolean notify)
Sets a renderer and sends a PlotChangeEvent to all registered listeners.
voidsetRenderers(XYItemRenderer[] renderers)
Sets the renderers for this plot and sends a PlotChangeEvent to all registered listeners.
voidsetSeriesRenderingOrder(SeriesRenderingOrder order)
Sets the series order and sends a PlotChangeEvent to all registered listeners.
voidsetWeight(int weight)
Sets the weight for the plot and sends a PlotChangeEvent to all registered listeners.
voidzoomDomainAxes(double factor, PlotRenderingInfo info, Point2D source)
Multiplies the range on the domain axis/axes by the specified factor.
voidzoomDomainAxes(double factor, PlotRenderingInfo info, Point2D source, boolean useAnchor)
Multiplies the range on the domain axis/axes by the specified factor.
voidzoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source)
Zooms in on the domain axis/axes.
voidzoomRangeAxes(double factor, PlotRenderingInfo info, Point2D source)
Multiplies the range on the range axis/axes by the specified factor.
voidzoomRangeAxes(double factor, PlotRenderingInfo info, Point2D source, boolean useAnchor)
Multiplies the range on the range axis/axes by the specified factor.
voidzoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source)
Zooms in on the range axes.

Field Detail

DEFAULT_CROSSHAIR_PAINT

public static final Paint DEFAULT_CROSSHAIR_PAINT
The default crosshair paint.

DEFAULT_CROSSHAIR_STROKE

public static final Stroke DEFAULT_CROSSHAIR_STROKE
The default crosshair stroke.

DEFAULT_CROSSHAIR_VISIBLE

public static final boolean DEFAULT_CROSSHAIR_VISIBLE
The default crosshair visibility.

DEFAULT_GRIDLINE_PAINT

public static final Paint DEFAULT_GRIDLINE_PAINT
The default grid line paint.

DEFAULT_GRIDLINE_STROKE

public static final Stroke DEFAULT_GRIDLINE_STROKE
The default grid line stroke.

localizationResources

protected static ResourceBundle localizationResources
The resourceBundle for the localization.

Constructor Detail

XYPlot

public XYPlot()
Creates a new XYPlot instance with no dataset, no axes and no renderer. You should specify these items before using the plot.

XYPlot

public XYPlot(XYDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, XYItemRenderer renderer)
Creates a new plot with the specified dataset, axes and renderer. Any of the arguments can be null, but in that case you should take care to specify the value before using the plot (otherwise a NullPointerException may be thrown).

Parameters: dataset the dataset (null permitted). domainAxis the domain axis (null permitted). rangeAxis the range axis (null permitted). renderer the renderer (null permitted).

Method Detail

addAnnotation

public void addAnnotation(XYAnnotation annotation)
Adds an annotation to the plot and sends a PlotChangeEvent to all registered listeners.

Parameters: annotation the annotation (null not permitted).

See Also: getAnnotations removeAnnotation

addAnnotation

public void addAnnotation(XYAnnotation annotation, boolean notify)
Adds an annotation to the plot and, if requested, sends a PlotChangeEvent to all registered listeners.

Parameters: annotation the annotation (null not permitted). notify notify listeners?

Since: 1.0.10

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: marker the marker (null not permitted).

See Also: XYPlot clearDomainMarkers

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: marker the marker (null not permitted). layer the layer (foreground or background).

See Also: XYPlot

addDomainMarker

public void addDomainMarker(int index, Marker marker, Layer layer)
Adds a marker for a specific dataset/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: index the dataset/renderer index. marker the marker. layer the layer (foreground or background).

See Also: XYPlot XYPlot

addDomainMarker

public void addDomainMarker(int index, Marker marker, Layer layer, boolean notify)
Adds a marker for a specific dataset/renderer and, if requested, 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: index the dataset/renderer index. marker the marker. layer the layer (foreground or background). notify notify listeners?

Since: 1.0.10

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: marker the marker (null not permitted).

See Also: XYPlot

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: marker the marker (null not permitted). layer the layer (foreground or background).

See Also: XYPlot

addRangeMarker

public void addRangeMarker(int index, Marker marker, Layer layer)
Adds a marker for a specific dataset/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: index the dataset/renderer index. marker the marker. layer the layer (foreground or background).

See Also: XYPlot XYPlot

addRangeMarker

public void addRangeMarker(int index, Marker marker, Layer layer, boolean notify)
Adds a marker for a specific dataset/renderer and, if requested, 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: index the dataset/renderer index. marker the marker. layer the layer (foreground or background). notify notify listeners?

Since: 1.0.10

calculateAxisSpace

protected AxisSpace calculateAxisSpace(Graphics2D g2, Rectangle2D plotArea)
Calculates the space required for all the axes in the plot.

Parameters: g2 the graphics device. plotArea the plot area.

Returns: The required space.

calculateDomainAxisSpace

protected AxisSpace calculateDomainAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space)
Calculates the space required for the domain axis/axes.

Parameters: g2 the graphics device. plotArea the plot area. space a carrier for the result (null permitted).

Returns: The required space.

calculateRangeAxisSpace

protected AxisSpace calculateRangeAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space)
Calculates the space required for the range axis/axes.

Parameters: g2 the graphics device. plotArea the plot area. space a carrier for the result (null permitted).

Returns: The required space.

clearAnnotations

public void clearAnnotations()
Clears all the annotations and sends a PlotChangeEvent to all registered listeners.

See Also: addAnnotation

clearDomainAxes

public void clearDomainAxes()
Clears the domain axes from the plot and sends a PlotChangeEvent to all registered listeners.

See Also: clearRangeAxes

clearDomainMarkers

public void clearDomainMarkers()
Clears all the (foreground and background) domain markers and sends a PlotChangeEvent to all registered listeners.

See Also: XYPlot

clearDomainMarkers

public void clearDomainMarkers(int index)
Clears the (foreground and background) domain markers for a particular renderer.

Parameters: index the renderer index.

See Also: XYPlot

clearRangeAxes

public void clearRangeAxes()
Clears the range axes from the plot and sends a PlotChangeEvent to all registered listeners.

See Also: clearDomainAxes

clearRangeMarkers

public void clearRangeMarkers()
Clears all the range markers and sends a PlotChangeEvent to all registered listeners.

See Also: clearRangeMarkers

clearRangeMarkers

public void clearRangeMarkers(int index)
Clears the (foreground and background) range markers for a particular renderer.

Parameters: index the renderer index.

clone

public Object clone()
Returns a clone of the plot.

Returns: A clone.

Throws: CloneNotSupportedException this can occur if some component of the plot cannot be cloned.

configureDomainAxes

public void configureDomainAxes()
Configures the domain axes.

configureRangeAxes

public void configureRangeAxes()
Configures the range axes.

See Also: configureDomainAxes

datasetChanged

public void datasetChanged(DatasetChangeEvent event)
Receives notification of a change to the plot's dataset.

The axis ranges are updated if necessary.

Parameters: event information about the event (not used 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.

Parameters: g2 the graphics device. area the plot area (in Java2D space). anchor an anchor point in Java2D space (null permitted). parentState the state from the parent plot, if there is one (null permitted). info collects chart drawing information (null permitted).

drawAnnotations

public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info)
Draws the annotations for the plot.

Parameters: g2 the graphics device. dataArea the data area. info the chart rendering info.

drawAxes

protected Map drawAxes(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, PlotRenderingInfo plotState)
A utility method for drawing the axes.

Parameters: g2 the graphics device (null not permitted). plotArea the plot area (null not permitted). dataArea the data area (null not permitted). plotState collects information about the plot (null permitted).

Returns: A map containing the state for each axis drawn.

drawBackground

public void drawBackground(Graphics2D g2, Rectangle2D area)
Draws the background for the plot.

Parameters: g2 the graphics device. area the area.

drawDomainCrosshair

protected void drawDomainCrosshair(Graphics2D g2, Rectangle2D dataArea, PlotOrientation orientation, double value, ValueAxis axis, Stroke stroke, Paint paint)
Draws a domain crosshair.

Parameters: g2 the graphics target. dataArea the data area. orientation the plot orientation. value the crosshair value. axis the axis against which the value is measured. stroke the stroke used to draw the crosshair line. paint the paint used to draw the crosshair line.

Since: 1.0.4

drawDomainGridlines

protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the gridlines for the plot, if they are visible.

Parameters: g2 the graphics device. dataArea the data area. ticks the ticks.

See Also: XYPlot

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: g2 the graphics device. dataArea the data area. index the renderer index. layer the layer (foreground or background).

drawDomainTickBands

public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the domain tick bands, if any.

Parameters: g2 the graphics device. dataArea the data area. ticks the ticks.

See Also: setDomainTickBandPaint

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: g2 the graphics device. dataArea the data area. value the coordinate, where to draw the line. stroke the stroke to use. paint the paint to use.

drawQuadrants

protected void drawQuadrants(Graphics2D g2, Rectangle2D area)
Draws the quadrants.

Parameters: g2 the graphics device. area the area.

See Also: setQuadrantOrigin XYPlot

drawRangeCrosshair

protected void drawRangeCrosshair(Graphics2D g2, Rectangle2D dataArea, PlotOrientation orientation, double value, ValueAxis axis, Stroke stroke, Paint paint)
Draws a range crosshair.

Parameters: g2 the graphics target. dataArea the data area. orientation the plot orientation. value the crosshair value. axis the axis against which the value is measured. stroke the stroke used to draw the crosshair line. paint the paint used to draw the crosshair line.

Since: 1.0.4

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: g2 the graphics device. area the data area. ticks the ticks.

See Also: XYPlot

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: g2 the graphics device. dataArea the data area. index the renderer index. layer the layer (foreground or background).

drawRangeTickBands

public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the range tick bands, if any.

Parameters: g2 the graphics device. dataArea the data area. ticks the ticks.

See Also: setRangeTickBandPaint

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: g2 the graphics device. dataArea the data area. value the coordinate, where to draw the line. stroke the stroke to use. paint the paint to use.

drawZeroDomainBaseline

protected void drawZeroDomainBaseline(Graphics2D g2, Rectangle2D area)
Draws a base line across the chart at value zero on the domain axis.

Parameters: g2 the graphics device. area the data area.

Since: 1.0.5

See Also:

drawZeroRangeBaseline

protected void drawZeroRangeBaseline(Graphics2D g2, Rectangle2D area)
Draws a base line across the chart at value zero on the range axis.

Parameters: g2 the graphics device. area the data area.

See Also: XYPlot

equals

public boolean equals(Object obj)
Tests this plot for equality with another object.

Parameters: obj the object (null permitted).

Returns: true or false.

getAnnotations

public List getAnnotations()
Returns the list of annotations.

Returns: The list of annotations.

Since: 1.0.1

See Also: addAnnotation

getAxisOffset

public RectangleInsets getAxisOffset()
Returns the axis offset.

Returns: The axis offset (never null).

See Also: setAxisOffset

getDataRange

public Range getDataRange(ValueAxis axis)
Returns the range for the specified axis.

Parameters: axis the axis.

Returns: The range.

getDataset

public XYDataset getDataset()
Returns the primary dataset for the plot.

Returns: The primary dataset (possibly null).

See Also: XYPlot setDataset

getDataset

public XYDataset getDataset(int index)
Returns a dataset.

Parameters: index the dataset index.

Returns: The dataset (possibly null).

See Also: XYPlot

getDatasetCount

public int getDatasetCount()
Returns the number of datasets.

Returns: The number of datasets.

getDatasetRenderingOrder

public DatasetRenderingOrder getDatasetRenderingOrder()
Returns the dataset rendering order.

Returns: The order (never null).

See Also: setDatasetRenderingOrder

getDomainAxis

public ValueAxis getDomainAxis()
Returns the domain axis with index 0. 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 (possibly null).

See Also: XYPlot setDomainAxis

getDomainAxis

public ValueAxis getDomainAxis(int index)
Returns the domain axis with the specified index, or null.

Parameters: index the axis index.

Returns: The axis (null possible).

See Also: XYPlot

getDomainAxisCount

public int getDomainAxisCount()
Returns the number of domain axes.

Returns: The axis count.

See Also: getRangeAxisCount

getDomainAxisEdge

public RectangleEdge getDomainAxisEdge()
Returns the edge for the primary domain axis (taking into account the plot's orientation).

Returns: The edge.

See Also: getDomainAxisLocation getOrientation

getDomainAxisEdge

public RectangleEdge getDomainAxisEdge(int index)
Returns the edge for a domain axis.

Parameters: index the axis index.

Returns: The edge.

See Also: XYPlot

getDomainAxisForDataset

public ValueAxis getDomainAxisForDataset(int index)
Returns the domain axis for a dataset.

Parameters: index the dataset index.

Returns: The axis.

getDomainAxisIndex

public int getDomainAxisIndex(ValueAxis axis)
Returns the index of the given domain axis.

Parameters: axis the axis.

Returns: The axis index.

See Also: getRangeAxisIndex

getDomainAxisLocation

public AxisLocation getDomainAxisLocation()
Returns the location of the primary domain axis.

Returns: The location (never null).

See Also: setDomainAxisLocation

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: index the axis index.

Returns: The location (never null).

See Also: XYPlot

getDomainCrosshairPaint

public Paint getDomainCrosshairPaint()
Returns the domain crosshair paint.

Returns: The crosshair paint (never null).

See Also: setDomainCrosshairPaint isDomainCrosshairVisible getDomainCrosshairStroke

getDomainCrosshairStroke

public Stroke getDomainCrosshairStroke()
Returns the Stroke used to draw the crosshair (if visible).

Returns: The crosshair stroke (never null).

See Also: setDomainCrosshairStroke isDomainCrosshairVisible getDomainCrosshairPaint

getDomainCrosshairValue

public double getDomainCrosshairValue()
Returns the domain crosshair value.

Returns: The value.

See Also: XYPlot

getDomainGridlinePaint

public Paint getDomainGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the domain axis.

Returns: The paint (never null).

See Also: setDomainGridlinePaint

getDomainGridlineStroke

public Stroke getDomainGridlineStroke()
Returns the stroke for the grid-lines (if any) plotted against the domain axis.

Returns: The stroke (never null).

See Also: setDomainGridlineStroke

getDomainMarkers

public Collection getDomainMarkers(Layer layer)
Returns the list of domain markers (read only) for the specified layer.

Parameters: layer the layer (foreground or background).

Returns: The list of domain markers.

See Also: getRangeMarkers

getDomainMarkers

public Collection getDomainMarkers(int index, Layer layer)
Returns a collection of domain markers for a particular renderer and layer.

Parameters: index the renderer index. layer the layer.

Returns: A collection of markers (possibly null).

See Also: XYPlot

getDomainTickBandPaint

public Paint getDomainTickBandPaint()
Returns the paint used for the domain tick bands. If this is null, no tick bands will be drawn.

Returns: The paint (possibly null).

See Also: setDomainTickBandPaint

getDomainZeroBaselinePaint

public Paint getDomainZeroBaselinePaint()
Returns the paint for the zero baseline (if any) plotted against the domain axis.

Returns: The paint (never null).

Since: 1.0.5

See Also: setDomainZeroBaselinePaint

getDomainZeroBaselineStroke

public Stroke getDomainZeroBaselineStroke()
Returns the stroke used for the zero baseline against the domain axis.

Returns: The stroke (never null).

Since: 1.0.5

See Also: setDomainZeroBaselineStroke

getFixedDomainAxisSpace

public AxisSpace getFixedDomainAxisSpace()
Returns the fixed domain axis space.

Returns: The fixed domain axis space (possibly null).

See Also: setFixedDomainAxisSpace

getFixedLegendItems

public LegendItemCollection getFixedLegendItems()
Returns the fixed legend items, if any.

Returns: The legend items (possibly null).

See Also: setFixedLegendItems

getFixedRangeAxisSpace

public AxisSpace getFixedRangeAxisSpace()
Returns the fixed range axis space.

Returns: The fixed range axis space (possibly null).

See Also: setFixedRangeAxisSpace

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: renderer the renderer (null permitted).

Returns: The renderer index.

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.

Returns: The legend items.

getOrientation

public PlotOrientation getOrientation()
Returns the orientation of the plot.

Returns: The orientation (never null).

See Also: setOrientation

getPlotType

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

Returns: A short string describing the type of plot.

getQuadrantOrigin

public Point2D getQuadrantOrigin()
Returns the origin for the quadrants that can be displayed on the plot. This defaults to (0, 0).

Returns: The origin point (never null).

See Also: setQuadrantOrigin

getQuadrantPaint

public Paint getQuadrantPaint(int index)
Returns the paint used for the specified quadrant.

Parameters: index the quadrant index (0-3).

Returns: The paint (possibly null).

See Also: XYPlot

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.

See Also: XYPlot setRangeAxis

getRangeAxis

public ValueAxis getRangeAxis(int index)
Returns a range axis.

Parameters: index the axis index.

Returns: The axis (null possible).

See Also: XYPlot

getRangeAxisCount

public int getRangeAxisCount()
Returns the number of range axes.

Returns: The axis count.

See Also: getDomainAxisCount

getRangeAxisEdge

public RectangleEdge getRangeAxisEdge()
Returns the edge for the primary range axis.

Returns: The range axis edge.

See Also: getRangeAxisLocation getOrientation

getRangeAxisEdge

public RectangleEdge getRangeAxisEdge(int index)
Returns the edge for a range axis.

Parameters: index the axis index.

Returns: The edge.

See Also: XYPlot getOrientation

getRangeAxisForDataset

public ValueAxis getRangeAxisForDataset(int index)
Returns the range axis for a dataset.

Parameters: index the dataset index.

Returns: The axis.

getRangeAxisIndex

public int getRangeAxisIndex(ValueAxis axis)
Returns the index of the given range axis.

Parameters: axis the axis.

Returns: The axis index.

See Also: getDomainAxisIndex

getRangeAxisLocation

public AxisLocation getRangeAxisLocation()
Returns the location of the primary range axis.

Returns: The location (never null).

See Also: setRangeAxisLocation

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: index the axis index.

Returns: The location (never null).

See Also: XYPlot

getRangeCrosshairPaint

public Paint getRangeCrosshairPaint()
Returns the range crosshair paint.

Returns: The crosshair paint (never null).

See Also: setRangeCrosshairPaint isRangeCrosshairVisible getRangeCrosshairStroke

getRangeCrosshairStroke

public Stroke getRangeCrosshairStroke()
Returns the stroke used to draw the crosshair (if visible).

Returns: The crosshair stroke (never null).

See Also: setRangeCrosshairStroke isRangeCrosshairVisible getRangeCrosshairPaint

getRangeCrosshairValue

public double getRangeCrosshairValue()
Returns the range crosshair value.

Returns: The value.

See Also: XYPlot

getRangeGridlinePaint

public Paint getRangeGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the range axis.

Returns: The paint (never null).

See Also: setRangeGridlinePaint

getRangeGridlineStroke

public Stroke getRangeGridlineStroke()
Returns the stroke for the grid lines (if any) plotted against the range axis.

Returns: The stroke (never null).

See Also: setRangeGridlineStroke

getRangeMarkers

public Collection getRangeMarkers(Layer layer)
Returns the list of range markers (read only) for the specified layer.

Parameters: layer the layer (foreground or background).

Returns: The list of range markers.

See Also: getDomainMarkers

getRangeMarkers

public Collection getRangeMarkers(int index, Layer layer)
Returns a collection of range markers for a particular renderer and layer.

Parameters: index the renderer index. layer the layer.

Returns: A collection of markers (possibly null).

See Also: XYPlot

getRangeTickBandPaint

public Paint getRangeTickBandPaint()
Returns the paint used for the range tick bands. If this is null, no tick bands will be drawn.

Returns: The paint (possibly null).

See Also: setRangeTickBandPaint

getRangeZeroBaselinePaint

public Paint getRangeZeroBaselinePaint()
Returns the paint for the zero baseline (if any) plotted against the range axis.

Returns: The paint (never null).

See Also: setRangeZeroBaselinePaint

getRangeZeroBaselineStroke

public Stroke getRangeZeroBaselineStroke()
Returns the stroke used for the zero baseline against the range axis.

Returns: The stroke (never null).

See Also: setRangeZeroBaselineStroke

getRenderer

public XYItemRenderer getRenderer()
Returns the renderer for the primary dataset.

Returns: The item renderer (possibly null).

See Also: setRenderer

getRenderer

public XYItemRenderer getRenderer(int index)
Returns the renderer for a dataset, or null.

Parameters: index the renderer index.

Returns: The renderer (possibly null).

See Also: XYPlot

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: dataset the dataset (null permitted).

Returns: The renderer (possibly null).

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.

Returns: The series count.

getSeriesRenderingOrder

public SeriesRenderingOrder getSeriesRenderingOrder()
Returns the series rendering order.

Returns: the order (never null).

See Also: setSeriesRenderingOrder

getWeight

public int getWeight()
Returns the weight for this plot when it is used as a subplot within a combined plot.

Returns: The weight.

See Also: XYPlot

handleClick

public void handleClick(int x, int y, PlotRenderingInfo info)
Handles a 'click' on the plot by updating the anchor values.

Parameters: x the x-coordinate, where the click occurred, in Java2D space. y the y-coordinate, where the click occurred, in Java2D space. info object containing information about the plot dimensions.

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: dataset the dataset (null not permitted).

Returns: The index.

isDomainCrosshairLockedOnData

public boolean isDomainCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.

Returns: The flag.

See Also: XYPlot

isDomainCrosshairVisible

public boolean isDomainCrosshairVisible()
Returns a flag indicating whether or not the domain crosshair is visible.

Returns: The flag.

See Also: XYPlot

isDomainGridlinesVisible

public boolean isDomainGridlinesVisible()
Returns true if the domain gridlines are visible, and false otherwise.

Returns: true or false.

See Also: XYPlot

isDomainZeroBaselineVisible

public boolean isDomainZeroBaselineVisible()
Returns a flag that controls whether or not a zero baseline is displayed for the domain axis.

Returns: A boolean.

Since: 1.0.5

See Also: XYPlot

isDomainZoomable

public boolean isDomainZoomable()
Returns true, indicating that the domain axis/axes for this plot are zoomable.

Returns: A boolean.

See Also: isRangeZoomable

isRangeCrosshairLockedOnData

public boolean isRangeCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.

Returns: The flag.

See Also: XYPlot

isRangeCrosshairVisible

public boolean isRangeCrosshairVisible()
Returns a flag indicating whether or not the range crosshair is visible.

Returns: The flag.

See Also: XYPlot isDomainCrosshairVisible

isRangeGridlinesVisible

public boolean isRangeGridlinesVisible()
Returns true if the range axis grid is visible, and false otherwise.

Returns: A boolean.

See Also: XYPlot

isRangeZeroBaselineVisible

public boolean isRangeZeroBaselineVisible()
Returns a flag that controls whether or not a zero baseline is displayed for the range axis.

Returns: A boolean.

See Also: XYPlot

isRangeZoomable

public boolean isRangeZoomable()
Returns true, indicating that the range axis/axes for this plot are zoomable.

Returns: A boolean.

See Also: isDomainZoomable

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: index the dataset index (zero-based). axisIndex the axis index.

See Also: XYPlot

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: index the dataset index (zero-based). axisIndex the axis index.

See Also: XYPlot

removeAnnotation

public boolean removeAnnotation(XYAnnotation annotation)
Removes an annotation from the plot and sends a PlotChangeEvent to all registered listeners.

Parameters: annotation the annotation (null not permitted).

Returns: A boolean (indicates whether or not the annotation was removed).

See Also: addAnnotation getAnnotations

removeAnnotation

public boolean removeAnnotation(XYAnnotation annotation, boolean notify)
Removes an annotation from the plot and sends a PlotChangeEvent to all registered listeners.

Parameters: annotation the annotation (null not permitted). notify notify listeners?

Returns: A boolean (indicates whether or not the annotation was removed).

Since: 1.0.10

removeDomainMarker

public boolean removeDomainMarker(Marker marker)
Removes a marker for the domain axis and sends a PlotChangeEvent to all registered listeners.

Parameters: marker the marker.

Returns: A boolean indicating whether or not the marker was actually removed.

Since: 1.0.7

removeDomainMarker

public boolean removeDomainMarker(Marker marker, Layer layer)
Removes a marker for the domain axis in the specified layer and sends a PlotChangeEvent to all registered listeners.

Parameters: marker the marker (null not permitted). layer the layer (foreground or background).

Returns: A boolean indicating whether or not the marker was actually removed.

Since: 1.0.7

removeDomainMarker

public boolean removeDomainMarker(int index, Marker marker, Layer layer)
Removes a marker for a specific dataset/renderer and sends a PlotChangeEvent to all registered listeners.

Parameters: index the dataset/renderer index. marker the marker. layer the layer (foreground or background).

Returns: A boolean indicating whether or not the marker was actually removed.

Since: 1.0.7

removeDomainMarker

public boolean removeDomainMarker(int index, Marker marker, Layer layer, boolean notify)
Removes a marker for a specific dataset/renderer and, if requested, sends a PlotChangeEvent to all registered listeners.

Parameters: index the dataset/renderer index. marker the marker. layer the layer (foreground or background). notify notify listeners?

Returns: A boolean indicating whether or not the marker was actually removed.

Since: 1.0.10

removeRangeMarker

public boolean removeRangeMarker(Marker marker)
Removes a marker for the range axis and sends a PlotChangeEvent to all registered listeners.

Parameters: marker the marker.

Returns: A boolean indicating whether or not the marker was actually removed.

Since: 1.0.7

removeRangeMarker

public boolean removeRangeMarker(Marker marker, Layer layer)
Removes a marker for the range axis in the specified layer and sends a PlotChangeEvent to all registered listeners.

Parameters: marker the marker (null not permitted). layer the layer (foreground or background).

Returns: A boolean indicating whether or not the marker was actually removed.

Since: 1.0.7

removeRangeMarker

public boolean removeRangeMarker(int index, Marker marker, Layer layer)
Removes a marker for a specific dataset/renderer and sends a PlotChangeEvent to all registered listeners.

Parameters: index the dataset/renderer index. marker the marker. layer the layer (foreground or background).

Returns: A boolean indicating whether or not the marker was actually removed.

Since: 1.0.7

removeRangeMarker

public boolean removeRangeMarker(int index, Marker marker, Layer layer, boolean notify)
Removes a marker for a specific dataset/renderer and sends a PlotChangeEvent to all registered listeners.

Parameters: index the dataset/renderer index. marker the marker. layer the layer (foreground or background). notify notify listeners?

Returns: A boolean indicating whether or not the marker was actually removed.

Since: 1.0.10

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: g2 the graphics device. dataArea the region in which the data is to be drawn. index the dataset index. info an optional object for collection dimension information. crosshairState collects crosshair information (null permitted).

Returns: A flag that indicates whether any data was actually rendered.

rendererChanged

public void rendererChanged(RendererChangeEvent event)
Receives notification of a renderer change event.

Parameters: event the event.

setAxisOffset

public void setAxisOffset(RectangleInsets offset)
Sets the axis offsets (gap between the data area and the axes) and sends a PlotChangeEvent to all registered listeners.

Parameters: offset the offset (null not permitted).

See Also: getAxisOffset

setDataset

public void setDataset(XYDataset dataset)
Sets the primary dataset for the plot, replacing the existing dataset if there is one.

Parameters: dataset the dataset (null permitted).

See Also: getDataset XYPlot

setDataset

public void setDataset(int index, XYDataset dataset)
Sets a dataset for the plot.

Parameters: index the dataset index. dataset the dataset (null permitted).

See Also: XYPlot

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: order the rendering order (null not permitted).

See Also: getDatasetRenderingOrder

setDomainAxes

public void setDomainAxes(ValueAxis[] axes)
Sets the domain axes for this plot and sends a PlotChangeEvent to all registered listeners.

Parameters: axes the axes (null not permitted).

See Also: (ValueAxis[])

setDomainAxis

public void setDomainAxis(ValueAxis axis)
Sets the domain axis for the plot and sends a PlotChangeEvent to all registered listeners.

Parameters: axis the new axis (null permitted).

See Also: getDomainAxis XYPlot

setDomainAxis

public void setDomainAxis(int index, ValueAxis axis)
Sets a domain axis and sends a PlotChangeEvent to all registered listeners.

Parameters: index the axis index. axis the axis (null permitted).

See Also: XYPlot XYPlot

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: index the axis index. axis the axis. notify notify listeners?

See Also: XYPlot

setDomainAxisLocation

public void setDomainAxisLocation(AxisLocation location)
Sets the location of the primary domain axis and sends a PlotChangeEvent to all registered listeners.

Parameters: location the location (null not permitted).

See Also: getDomainAxisLocation

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: location the location (null not permitted). notify notify listeners?

See Also: getDomainAxisLocation

setDomainAxisLocation

public void setDomainAxisLocation(int index, AxisLocation location)
Sets the location for a domain axis and sends a PlotChangeEvent to all registered listeners.

Parameters: index the axis index. location the location (null not permitted for index 0).

See Also: XYPlot

setDomainAxisLocation

public void setDomainAxisLocation(int index, AxisLocation location, boolean notify)
Sets the axis location for a domain axis and, if requested, sends a PlotChangeEvent to all registered listeners.

Parameters: index the axis index. location the location (null not permitted for index 0). notify notify listeners?

Since: 1.0.5

See Also: XYPlot XYPlot

setDomainCrosshairLockedOnData

public void setDomainCrosshairLockedOnData(boolean flag)
Sets the flag indicating whether or not the domain crosshair should "lock-on" to actual data values. If the flag value changes, this method sends a PlotChangeEvent to all registered listeners.

Parameters: flag the flag.

See Also: isDomainCrosshairLockedOnData

setDomainCrosshairPaint

public void setDomainCrosshairPaint(Paint paint)
Sets the paint used to draw the crosshairs (if visible) and sends a PlotChangeEvent to all registered listeners.

Parameters: paint the new crosshair paint (null not permitted).

See Also: getDomainCrosshairPaint

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: stroke the new crosshair stroke (null not permitted).

See Also: getDomainCrosshairStroke

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: value the value.

See Also: getDomainCrosshairValue

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: value the new value. notify notify listeners?

See Also: getDomainCrosshairValue

setDomainCrosshairVisible

public void setDomainCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the domain crosshair is visible and, if the flag changes, sends a PlotChangeEvent to all registered listeners.

Parameters: flag the new value of the flag.

See Also: isDomainCrosshairVisible

setDomainGridlinePaint

public void setDomainGridlinePaint(Paint paint)
Sets the paint for the grid lines plotted against the domain axis, and sends a PlotChangeEvent to all registered listeners.

Parameters: paint the paint (null not permitted).

Throws: IllegalArgumentException if paint is null.

See Also: getDomainGridlinePaint

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: visible the new value of the flag.

See Also: isDomainGridlinesVisible

setDomainGridlineStroke

public void setDomainGridlineStroke(Stroke stroke)
Sets the stroke for the grid lines plotted against the domain axis, and sends a PlotChangeEvent to all registered listeners.

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

Parameters: stroke the stroke (null not permitted).

Throws: IllegalArgumentException if stroke is null.

See Also: getDomainGridlineStroke

setDomainTickBandPaint

public void setDomainTickBandPaint(Paint paint)
Sets the paint for the domain tick bands.

Parameters: paint the paint (null permitted).

See Also: getDomainTickBandPaint

setDomainZeroBaselinePaint

public void setDomainZeroBaselinePaint(Paint paint)
Sets the paint for the zero baseline plotted against the domain axis and sends a PlotChangeEvent to all registered listeners.

Parameters: paint the paint (null not permitted).

Since: 1.0.5

See Also: getDomainZeroBaselinePaint

setDomainZeroBaselineStroke

public void setDomainZeroBaselineStroke(Stroke stroke)
Sets the stroke for the zero baseline for the domain axis, and sends a PlotChangeEvent to all registered listeners.

Parameters: stroke the stroke (null not permitted).

Since: 1.0.5

See Also: getRangeZeroBaselineStroke

setDomainZeroBaselineVisible

public void setDomainZeroBaselineVisible(boolean visible)
Sets the flag that controls whether or not the zero baseline is displayed for the domain axis, and sends a PlotChangeEvent to all registered listeners.

Parameters: visible the flag.

Since: 1.0.5

See Also: isDomainZeroBaselineVisible

setFixedDomainAxisSpace

public void setFixedDomainAxisSpace(AxisSpace space)
Sets the fixed domain axis space and sends a PlotChangeEvent to all registered listeners.

Parameters: space the space (null permitted).

See Also: getFixedDomainAxisSpace

setFixedDomainAxisSpace

public void setFixedDomainAxisSpace(AxisSpace space, boolean notify)
Sets the fixed domain axis space and, if requested, sends a PlotChangeEvent to all registered listeners.

Parameters: space the space (null permitted). notify notify listeners?

Since: 1.0.9

See Also:

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: items the legend items (null permitted).

See Also: getFixedLegendItems

setFixedRangeAxisSpace

public void setFixedRangeAxisSpace(AxisSpace space)
Sets the fixed range axis space and sends a PlotChangeEvent to all registered listeners.

Parameters: space the space (null permitted).

See Also: getFixedRangeAxisSpace

setFixedRangeAxisSpace

public void setFixedRangeAxisSpace(AxisSpace space, boolean notify)
Sets the fixed range axis space and, if requested, sends a PlotChangeEvent to all registered listeners.

Parameters: space the space (null permitted). notify notify listeners?

Since: 1.0.9

See Also:

setOrientation

public void setOrientation(PlotOrientation orientation)
Sets the orientation for the plot and sends a PlotChangeEvent to all registered listeners.

Parameters: orientation the orientation (null not allowed).

See Also: getOrientation

setQuadrantOrigin

public void setQuadrantOrigin(Point2D origin)
Sets the quadrant origin and sends a PlotChangeEvent to all registered listeners.

Parameters: origin the origin (null not permitted).

See Also: getQuadrantOrigin

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: index the quadrant index (0-3). paint the paint (null permitted).

See Also: XYPlot

setRangeAxes

public void setRangeAxes(ValueAxis[] axes)
Sets the range axes for this plot and sends a PlotChangeEvent to all registered listeners.

Parameters: axes the axes (null not permitted).

See Also: (ValueAxis[])

setRangeAxis

public void setRangeAxis(ValueAxis axis)
Sets the range axis for the plot and sends a PlotChangeEvent to all registered listeners.

Parameters: axis the axis (null permitted).

See Also: getRangeAxis XYPlot

setRangeAxis

public void setRangeAxis(int index, ValueAxis axis)
Sets a range axis and sends a PlotChangeEvent to all registered listeners.

Parameters: index the axis index. axis the axis (null permitted).

See Also: XYPlot

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: index the axis index. axis the axis (null permitted). notify notify listeners?

See Also: XYPlot

setRangeAxisLocation

public void setRangeAxisLocation(AxisLocation location)
Sets the location of the primary range axis and sends a PlotChangeEvent to all registered listeners.

Parameters: location the location (null not permitted).

See Also: getRangeAxisLocation

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: location the location (null not permitted). notify notify listeners?

See Also: getRangeAxisLocation

setRangeAxisLocation

public void setRangeAxisLocation(int index, AxisLocation location)
Sets the location for a range axis and sends a PlotChangeEvent to all registered listeners.

Parameters: index the axis index. location the location (null permitted).

See Also: XYPlot

setRangeAxisLocation

public void setRangeAxisLocation(int index, AxisLocation location, boolean notify)
Sets the axis location for a domain axis and, if requested, sends a PlotChangeEvent to all registered listeners.

Parameters: index the axis index. location the location (null not permitted for index 0). notify notify listeners?

Since: 1.0.5

See Also: XYPlot XYPlot

setRangeCrosshairLockedOnData

public void setRangeCrosshairLockedOnData(boolean flag)
Sets the flag indicating whether or not the range crosshair should "lock-on" to actual data values. If the flag value changes, this method sends a PlotChangeEvent to all registered listeners.

Parameters: flag the flag.

See Also: isRangeCrosshairLockedOnData

setRangeCrosshairPaint

public void setRangeCrosshairPaint(Paint paint)
Sets the paint used to color the crosshairs (if visible) and sends a PlotChangeEvent to all registered listeners.

Parameters: paint the new crosshair paint (null not permitted).

See Also: getRangeCrosshairPaint

setRangeCrosshairStroke

public void setRangeCrosshairStroke(Stroke stroke)
Sets the stroke used to draw the crosshairs (if visible) and sends a PlotChangeEvent to all registered listeners.

Parameters: stroke the new crosshair stroke (null not permitted).

See Also: getRangeCrosshairStroke

setRangeCrosshairValue

public void setRangeCrosshairValue(double value)
Sets the range crosshair value.

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

Parameters: value the new value.

See Also: getRangeCrosshairValue

setRangeCrosshairValue

public void setRangeCrosshairValue(double value, boolean notify)
Sets the range crosshair value and sends a PlotChangeEvent to all registered listeners, but only if the crosshair is visible.

Parameters: value the new value. notify a flag that controls whether or not listeners are notified.

See Also: getRangeCrosshairValue

setRangeCrosshairVisible

public void setRangeCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the range crosshair is visible. If the flag value changes, this method sends a PlotChangeEvent to all registered listeners.

Parameters: flag the new value of the flag.

See Also: isRangeCrosshairVisible

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: paint the paint (null not permitted).

See Also: getRangeGridlinePaint

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: visible the new value of the flag.

See Also: isRangeGridlinesVisible

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: stroke the stroke (null not permitted).

See Also: getRangeGridlineStroke

setRangeTickBandPaint

public void setRangeTickBandPaint(Paint paint)
Sets the paint for the range tick bands.

Parameters: paint the paint (null permitted).

See Also: getRangeTickBandPaint

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: paint the paint (null not permitted).

See Also: getRangeZeroBaselinePaint

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: stroke the stroke (null not permitted).

See Also: getRangeZeroBaselineStroke

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: visible the flag.

See Also: isRangeZeroBaselineVisible

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: renderer the renderer (null permitted).

See Also: getRenderer

setRenderer

public void setRenderer(int index, XYItemRenderer renderer)
Sets a renderer and sends a PlotChangeEvent to all registered listeners.

Parameters: index the index. renderer the renderer.

See Also: XYPlot

setRenderer

public void setRenderer(int index, XYItemRenderer renderer, boolean notify)
Sets a renderer and sends a PlotChangeEvent to all registered listeners.

Parameters: index the index. renderer the renderer. notify notify listeners?

See Also: XYPlot

setRenderers

public void setRenderers(XYItemRenderer[] renderers)
Sets the renderers for this plot and sends a PlotChangeEvent to all registered listeners.

Parameters: renderers the renderers (null not permitted).

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: order the rendering order (null not permitted).

See Also: getSeriesRenderingOrder

setWeight

public void setWeight(int weight)
Sets the weight for the plot and sends a PlotChangeEvent to all registered listeners.

Parameters: weight the weight.

See Also: getWeight

zoomDomainAxes

public void zoomDomainAxes(double factor, PlotRenderingInfo info, Point2D source)
Multiplies the range on the domain axis/axes by the specified factor.

Parameters: factor the zoom factor. info the plot rendering info. source the source point (in Java2D space).

See Also: XYPlot

zoomDomainAxes

public void zoomDomainAxes(double factor, PlotRenderingInfo info, Point2D source, boolean useAnchor)
Multiplies the range on the domain axis/axes by the specified factor.

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

See Also:

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.

Parameters: lowerPercent a percentage that determines the new lower bound for the axis (e.g. 0.20 is twenty percent). upperPercent a percentage that determines the new upper bound for the axis (e.g. 0.80 is eighty percent). info the plot rendering info. source the source point (ignored).

See Also: XYPlot

zoomRangeAxes

public void zoomRangeAxes(double factor, PlotRenderingInfo info, Point2D source)
Multiplies the range on the range axis/axes by the specified factor.

Parameters: factor the zoom factor. info the plot rendering info. source the source point.

See Also: XYPlot

zoomRangeAxes

public void zoomRangeAxes(double factor, PlotRenderingInfo info, Point2D source, boolean useAnchor)
Multiplies the range on the range axis/axes by the specified factor.

Parameters: factor the zoom factor. info the plot rendering info. source the source point. useAnchor a flag that controls whether or not the source point is used for the zoom anchor.

Since: 1.0.7

See Also:

zoomRangeAxes

public void zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source)
Zooms in on the range axes.

Parameters: lowerPercent the lower bound. upperPercent the upper bound. info the plot rendering info. source the source point.

See Also: XYPlot