Class XYPlot
- All Implemented Interfaces:
 Serializable,Cloneable,EventListener,AxisChangeListener,RendererChangeListener,ValueAxisPlot,DatasetChangeListener
- Direct Known Subclasses:
 CombinedDomainXYPlot,CombinedRangeXYPlot
public class XYPlot extends Plot implements ValueAxisPlot, RendererChangeListener, Cloneable, Serializable
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.
- See Also:
 - Serialized Form
 
- 
Field Summary
Fields Modifier and Type Field Description static PaintDEFAULT_CROSSHAIR_PAINTThe default crosshair paint.static StrokeDEFAULT_CROSSHAIR_STROKEThe default crosshair stroke.static booleanDEFAULT_CROSSHAIR_VISIBLEThe default crosshair visibility.static PaintDEFAULT_GRIDLINE_PAINTThe default grid line paint.static StrokeDEFAULT_GRIDLINE_STROKEThe default grid line stroke.Fields inherited from class org.jfree.chart.plot.Plot
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO - 
Constructor Summary
 - 
Method Summary
Modifier and Type Method Description voidaddAnnotation(XYAnnotation annotation)Adds an annotation to the plot and sends aPlotChangeEventto all registered listeners.voidaddDomainMarker(int index, Marker marker, org.jfree.ui.Layer layer)Adds a marker for a renderer and sends aPlotChangeEventto all registered listeners.voidaddDomainMarker(Marker marker)Adds a marker for the domain axis and sends aPlotChangeEventto all registered listeners.voidaddDomainMarker(Marker marker, org.jfree.ui.Layer layer)Adds a marker for the domain axis in the specified layer and sends aPlotChangeEventto all registered listeners.voidaddRangeMarker(int index, Marker marker, org.jfree.ui.Layer layer)Adds a marker for a renderer and sends aPlotChangeEventto all registered listeners.voidaddRangeMarker(Marker marker)Adds a marker for the range axis and sends aPlotChangeEventto all registered listeners.voidaddRangeMarker(Marker marker, org.jfree.ui.Layer layer)Adds a marker for the range axis in the specified layer and sends aPlotChangeEventto all registered listeners.voidclearAnnotations()Clears all the annotations and sends aPlotChangeEventto all registered listeners.voidclearDomainAxes()Clears the domain axes from the plot and sends aPlotChangeEventto all registered listeners.voidclearDomainMarkers()Clears all the (foreground and background) domain markers and sends aPlotChangeEventto all registered listeners.voidclearRangeAxes()Clears the range axes from the plot and sends aPlotChangeEventto all registered listeners.voidclearRangeMarkers()Clears all the range markers and sends aPlotChangeEventto 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.voiddraw(Graphics2D g2, Rectangle2D area, PlotState parentState, PlotRenderingInfo state)Draws the plot on a Java 2D graphics device (such as the screen or a printer).voiddrawAnnotations(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info)Draws the annotations for the plot.voiddrawBackground(Graphics2D g2, Rectangle2D area)Draws the background for the plot.voiddrawDomainTickBands(Graphics2D g2, Rectangle2D dataArea, List<ValueTick> ticks)Draws the domain tick bands, if any.voiddrawRangeTickBands(Graphics2D g2, Rectangle2D dataArea, List<ValueTick> ticks)Draws the range tick bands, if any.booleanequals(Object obj)Tests this plot for equality with another object.org.jfree.ui.SpacergetAxisOffset()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 for the plot.ValueAxisgetDomainAxis(int index)Returns a domain axis.intgetDomainAxisCount()Returns the number of domain axes.org.jfree.ui.RectangleEdgegetDomainAxisEdge()Returns the edge for the primary domain axis (taking into account the plot's orientation.org.jfree.ui.RectangleEdgegetDomainAxisEdge(int index)Returns the edge for a domain axis.ValueAxisgetDomainAxisForDataset(int index)Returns the domain axis for a dataset.AxisLocationgetDomainAxisLocation()Returns the location of the primary domain axis.AxisLocationgetDomainAxisLocation(int index)Returns the location for a domain axis.PaintgetDomainCrosshairPaint()Returns the domain crosshair color.StrokegetDomainCrosshairStroke()Returns theStrokeused 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(int index, org.jfree.ui.Layer layer)Returns a collection of domain markers for a particular renderer and layer.CollectiongetDomainMarkers(org.jfree.ui.Layer layer)Returns the list of domain markers (read only) for the specified layer.PaintgetDomainTickBandPaint()Returns the paint used for the domain tick bands.AxisSpacegetFixedDomainAxisSpace()Returns the fixed domain axis space.LegendItemCollectiongetFixedLegendItems()Returns the fixed legend items, if any.AxisSpacegetFixedRangeAxisSpace()Returns the fixed range axis space.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.org.jfree.ui.RectangleEdgegetRangeAxisEdge()Returns the edge for the primary range axis.org.jfree.ui.RectangleEdgegetRangeAxisEdge(int index)Returns the edge for a range axis.ValueAxisgetRangeAxisForDataset(int index)Returns the range axis for a dataset.AxisLocationgetRangeAxisLocation()Returns the location of the primary range axis.AxisLocationgetRangeAxisLocation(int index)Returns the location for a range axis.PaintgetRangeCrosshairPaint()Returns the range crosshair color.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.Collection<Marker>getRangeMarkers(int index, org.jfree.ui.Layer layer)Returns a collection of range markers for a particular renderer and layer.CollectiongetRangeMarkers(org.jfree.ui.Layer layer)Returns the list of range markers (read only) for the specified layer.PaintgetRangeTickBandPaint()Returns the paint used for the range tick bands.XYItemRenderergetRenderer()Returns the renderer for the primary dataset.XYItemRenderergetRenderer(int index)Returns the renderer for a dataset, ornull.XYItemRenderergetRendererForDataset(XYDataset dataset)Returns the renderer for the specified dataset.intgetSeriesCount()Returns the number of series in the primary dataset for this plot.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-1if 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()Returnstrueif the domain gridlines are visible, andfalseotherwise.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()Returnstrueif the range axis grid is visible, andfalseotherwise.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.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(org.jfree.ui.Spacer offset)Sets the axis offsets (gap between the data area and the axes).voidsetDataset(int index, XYDataset dataset)Sets a dataset for the plot.voidsetDataset(XYDataset dataset)Sets the primary dataset for the plot, replacing the existing dataset if there is one.voidsetDatasetRenderingOrder(DatasetRenderingOrder order)Sets the rendering order and sends aPlotChangeEventto all registered listeners.voidsetDomainAxis(int index, ValueAxis axis)Sets a domain axis and sends aPlotChangeEventto all registered listeners.voidsetDomainAxis(ValueAxis axis)Sets the domain axis for the plot and sends aPlotChangeEventto all registered listeners.voidsetDomainAxisLocation(int index, AxisLocation location)Sets the location for a domain axis and sends aPlotChangeEventto all registered listeners.voidsetDomainAxisLocation(AxisLocation location)Sets the location of the domain axis and sends aPlotChangeEventto all registered listeners.voidsetDomainAxisLocation(AxisLocation location, boolean notify)Sets the location of the domain axis and, if requested, sends aPlotChangeEventto 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 color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.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 aPlotChangeEventto all registered listeners (provided that the domain crosshair is visible).voidsetDomainCrosshairValue(double value, boolean notify)Sets the domain crosshair value and, if requested, sends aPlotChangeEventto 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.voidsetDomainGridlinePaint(Paint paint)Sets the paint for the grid lines plotted against the domain axis.voidsetDomainGridlineStroke(Stroke stroke)Sets the stroke for the grid lines plotted against the domain axis.voidsetDomainGridlinesVisible(boolean visible)Sets the flag that controls whether or not the domain grid-lines are visible.voidsetDomainTickBandPaint(Paint paint)Sets the paint for the domain tick bands.voidsetFixedDomainAxisSpace(AxisSpace space)Sets the fixed domain axis space.voidsetFixedLegendItems(LegendItemCollection items)Sets the fixed legend items for the plot.voidsetFixedRangeAxisSpace(AxisSpace space)Sets the fixed range axis space.voidsetOrientation(PlotOrientation orientation)Sets the orientation for the plot.voidsetQuadrantOrigin(Point2D origin)Sets the quadrant origin and sends aPlotChangeEventto all registered listeners.voidsetQuadrantPaint(int index, Paint paint)Sets the paint used for the specified quadrant and sends aPlotChangeEventto all registered listeners.voidsetRangeAxis(int index, ValueAxis axis)Sets a range axis and sends aPlotChangeEventto all registered listeners.voidsetRangeAxis(ValueAxis axis)Sets the range axis for the plot and sends aPlotChangeEventto all registered listeners.voidsetRangeAxisLocation(int index, AxisLocation location)Sets the location for a range axis and sends aPlotChangeEventto all registered listeners.voidsetRangeAxisLocation(AxisLocation location)Sets the location of the primary range axis and sends aPlotChangeEventto all registered listeners.voidsetRangeAxisLocation(AxisLocation location, boolean notify)Sets the location of the primary range axis and, if requested, sends aPlotChangeEventto 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 notifies registered listeners that the axis has been modified.voidsetRangeCrosshairStroke(Stroke stroke)Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.voidsetRangeCrosshairValue(double value)Sets the domain crosshair value.voidsetRangeCrosshairValue(double value, boolean notify)Sets the range crosshair value.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.voidsetRangeGridlineStroke(Stroke stroke)Sets the stroke for the grid lines plotted against the range axis.voidsetRangeGridlinesVisible(boolean visible)Sets the flag that controls whether or not the range axis grid lines are visible.voidsetRangeTickBandPaint(Paint paint)Sets the paint for the range tick bands.voidsetRenderer(int index, XYItemRenderer renderer)Sets a renderer and sends aPlotChangeEventis sent to all registered listeners.voidsetRenderer(XYItemRenderer renderer)Sets the renderer for the primary dataset and sends aPlotChangeEventto all registered listeners.voidsetWeight(int weight)Sets the weight for the plot.voidzoom(double percent)Zooms the axis ranges by the specified percentage about the anchor point.voidzoomHorizontalAxes(double factor)Multiplies the range on the horizontal axis/axes by the specified factor.voidzoomHorizontalAxes(double lowerPercent, double upperPercent)Zooms in on the horizontal axis/axes.voidzoomVerticalAxes(double factor)Multiplies the range on the vertical axis/axes by the specified factor.voidzoomVerticalAxes(double lowerPercent, double upperPercent)Zooms in on the vertical axes.Methods inherited from class org.jfree.chart.plot.Plot
addChangeListener, axisChanged, drawOutline, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundPaint, getDataAreaRatio, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRootPlot, isPlotShowing, isSubplot, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundPaint, setDataAreaRatio, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setOutlinePaint, setOutlineStroke, setParent, setPlotShowing 
- 
Field Details
- 
DEFAULT_GRIDLINE_STROKE
The default grid line stroke. - 
DEFAULT_GRIDLINE_PAINT
The default grid line paint. - 
DEFAULT_CROSSHAIR_VISIBLE
public static final boolean DEFAULT_CROSSHAIR_VISIBLEThe default crosshair visibility.- See Also:
 - Constant Field Values
 
 - 
DEFAULT_CROSSHAIR_STROKE
The default crosshair stroke. - 
DEFAULT_CROSSHAIR_PAINT
The default crosshair paint. 
 - 
 - 
Constructor Details
- 
XYPlot
public XYPlot()Default constructor. - 
XYPlot
public XYPlot(XYDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, XYItemRenderer renderer)Creates a new plot.- Parameters:
 dataset- the dataset (nullpermitted).domainAxis- the domain axis (nullpermitted).rangeAxis- the range axis (nullpermitted).renderer- the renderer (nullpermitted).
 
 - 
 - 
Method Details
- 
getPlotType
Returns the plot type as a string.- Specified by:
 getPlotTypein classPlot- Returns:
 - a short string describing the type of plot.
 
 - 
getOrientation
Returns the orientation of the plot.- Returns:
 - The orientation of the plot.
 
 - 
setOrientation
Sets the orientation for the plot.- Parameters:
 orientation- the orientation (nullnot allowed).
 - 
getAxisOffset
public org.jfree.ui.Spacer getAxisOffset()Returns the axis offset.- Returns:
 - The axis offset.
 
 - 
setAxisOffset
public void setAxisOffset(org.jfree.ui.Spacer offset)Sets the axis offsets (gap between the data area and the axes).- Parameters:
 offset- the offset.
 - 
getDomainAxis
Returns the domain axis for the plot. If the domain axis for this plot is null, then the method will return the parent plot's domain axis (if there is a parent plot).- Returns:
 - The domain axis.
 
 - 
getDomainAxis
Returns a domain axis.- Parameters:
 index- the axis index.- Returns:
 - The axis (
nullpossible). 
 - 
setDomainAxis
Sets the domain axis for the plot and sends aPlotChangeEventto all registered listeners.- Parameters:
 axis- the new axis (nullpermitted).
 - 
setDomainAxis
Sets a domain axis and sends aPlotChangeEventto all registered listeners.- Parameters:
 index- the axis index.axis- the axis.
 - 
getDomainAxisLocation
Returns the location of the primary domain axis.- Returns:
 - The location (never 
null). 
 - 
setDomainAxisLocation
Sets the location of the domain axis and sends aPlotChangeEventto all registered listeners.- Parameters:
 location- the location (nullnot permitted).
 - 
setDomainAxisLocation
Sets the location of the domain axis and, if requested, sends aPlotChangeEventto all registered listeners.- Parameters:
 location- the location (nullnot permitted).notify- notify listeners?
 - 
getDomainAxisEdge
public org.jfree.ui.RectangleEdge getDomainAxisEdge()Returns the edge for the primary domain axis (taking into account the plot's orientation.- Returns:
 - The edge.
 
 - 
getDomainAxisCount
public int getDomainAxisCount()Returns the number of domain axes.- Returns:
 - The axis count.
 
 - 
clearDomainAxes
public void clearDomainAxes()Clears the domain axes from the plot and sends aPlotChangeEventto all registered listeners. - 
configureDomainAxes
public void configureDomainAxes()Configures the domain axes. - 
getDomainAxisLocation
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). 
 - 
setDomainAxisLocation
Sets the location for a domain axis and sends aPlotChangeEventto all registered listeners.- Parameters:
 index- the axis index.location- the location (nullpermitted).
 - 
getDomainAxisEdge
public org.jfree.ui.RectangleEdge getDomainAxisEdge(int index)Returns the edge for a domain axis.- Parameters:
 index- the axis index.- Returns:
 - The edge.
 
 - 
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.
 
 - 
setRangeAxis
Sets the range axis for the plot and sends aPlotChangeEventto all registered listeners.- Parameters:
 axis- the axis (nullpermitted).
 - 
getRangeAxisLocation
Returns the location of the primary range axis.- Returns:
 - the location (never 
null). 
 - 
setRangeAxisLocation
Sets the location of the primary range axis and sends aPlotChangeEventto all registered listeners.- Parameters:
 location- the location (nullnot permitted).
 - 
setRangeAxisLocation
Sets the location of the primary range axis and, if requested, sends aPlotChangeEventto all registered listeners.- Parameters:
 location- the location (nullnot permitted).notify- notify listeners?
 - 
getRangeAxisEdge
public org.jfree.ui.RectangleEdge getRangeAxisEdge()Returns the edge for the primary range axis.- Returns:
 - The range axis edge.
 
 - 
getRangeAxis
Returns a range axis.- Parameters:
 index- the axis index.- Returns:
 - The axis (
nullpossible). 
 - 
setRangeAxis
Sets a range axis and sends aPlotChangeEventto all registered listeners.- Parameters:
 index- the axis index.axis- the axis (nullpermitted).
 - 
getRangeAxisCount
public int getRangeAxisCount()Returns the number of range axes.- Returns:
 - The axis count.
 
 - 
clearRangeAxes
public void clearRangeAxes()Clears the range axes from the plot and sends aPlotChangeEventto all registered listeners. - 
configureRangeAxes
public void configureRangeAxes()Configures the range axes. - 
getRangeAxisLocation
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). 
 - 
setRangeAxisLocation
Sets the location for a range axis and sends aPlotChangeEventto all registered listeners.- Parameters:
 index- the axis index.location- the location (nullpermitted).
 - 
getRangeAxisEdge
public org.jfree.ui.RectangleEdge getRangeAxisEdge(int index)Returns the edge for a range axis.- Parameters:
 index- the axis index.- Returns:
 - The edge.
 
 - 
getDataset
Returns the primary dataset for the plot.- Returns:
 - The primary dataset (possibly 
null). 
 - 
getDataset
Returns a dataset.- Parameters:
 index- the dataset index.- Returns:
 - The dataset (possibly 
null). 
 - 
setDataset
Sets the primary dataset for the plot, replacing the existing dataset if there is one.- Parameters:
 dataset- the dataset (nullpermitted).
 - 
setDataset
Sets a dataset for the plot.- Parameters:
 index- the dataset index.dataset- the dataset (nullpermitted).
 - 
getDatasetCount
public int getDatasetCount()Returns the number of datasets.- Returns:
 - The number of datasets.
 
 - 
indexOf
Returns the index of the specified dataset, or-1if the dataset does not belong to the plot.- Parameters:
 dataset- the dataset (nullnot permitted).- Returns:
 - The index.
 
 - 
mapDatasetToDomainAxis
public void mapDatasetToDomainAxis(int index, int axisIndex)Maps a dataset to a particular domain axis.- Parameters:
 index- the dataset index (zero-based).axisIndex- the axis index.
 - 
mapDatasetToRangeAxis
public void mapDatasetToRangeAxis(int index, int axisIndex)Maps a dataset to a particular range axis.- Parameters:
 index- the dataset index (zero-based).axisIndex- the axis index.
 - 
getRenderer
Returns the renderer for the primary dataset.- Returns:
 - The item renderer (possibly 
null). 
 - 
getRenderer
Returns the renderer for a dataset, ornull.- Parameters:
 index- the renderer index.- Returns:
 - The renderer (possibly 
null). 
 - 
setRenderer
Sets the renderer for the primary dataset and sends aPlotChangeEventto all registered listeners. If the renderer is set tonull, no data will be displayed.- Parameters:
 renderer- the renderer (nullpermitted).
 - 
setRenderer
Sets a renderer and sends aPlotChangeEventis sent to all registered listeners.- Parameters:
 index- the index.renderer- the renderer.
 - 
getDatasetRenderingOrder
Returns the dataset rendering order.- Returns:
 - the order (never 
null). 
 - 
setDatasetRenderingOrder
Sets the rendering order and sends aPlotChangeEventto 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 (nullnot permitted).
 - 
getRendererForDataset
Returns the renderer for the specified dataset.- Parameters:
 dataset- the dataset (nullpermitted).- Returns:
 - The renderer (possibly 
null). 
 - 
getWeight
public int getWeight()Returns the weight for this plot when it is used as a subplot within a combined plot.- Returns:
 - the weight.
 
 - 
setWeight
public void setWeight(int weight)Sets the weight for the plot.- Parameters:
 weight- the weight.
 - 
isDomainGridlinesVisible
public boolean isDomainGridlinesVisible()Returnstrueif the domain gridlines are visible, andfalseotherwise. @returntrueorfalse. - 
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
PlotChangeEventis sent to all registered listeners.- Parameters:
 visible- the new value of the flag.
 - 
getDomainGridlineStroke
Returns the stroke for the grid-lines (if any) plotted against the domain axis.- Returns:
 - the stroke.
 
 - 
setDomainGridlineStroke
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:
 stroke- the stroke (nullpermitted).
 - 
getDomainGridlinePaint
Returns the paint for the grid lines (if any) plotted against the domain axis.- Returns:
 - the paint.
 
 - 
setDomainGridlinePaint
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:
 paint- the paint (nullpermitted).
 - 
isRangeGridlinesVisible
public boolean isRangeGridlinesVisible()Returnstrueif the range axis grid is visible, andfalseotherwise. @returntrueorfalse. - 
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
PlotChangeEventis sent to all registered listeners.- Parameters:
 visible- the new value of the flag.
 - 
getRangeGridlineStroke
Returns the stroke for the grid lines (if any) plotted against the range axis.- Returns:
 - the stroke.
 
 - 
setRangeGridlineStroke
Sets the stroke for the grid lines plotted against the range axis.If you set this to
null, no grid lines will be drawn.- Parameters:
 stroke- the stroke (nullpermitted).
 - 
getRangeGridlinePaint
Returns the paint for the grid lines (if any) plotted against the range axis.- Returns:
 - the paint.
 
 - 
setRangeGridlinePaint
Sets the paint for the grid lines plotted against the range axis.If you set this to
null, no grid lines will be drawn.- Parameters:
 paint- the paint (nullpermitted).
 - 
getDomainTickBandPaint
Returns the paint used for the domain tick bands. If this isnull, no tick bands will be drawn.- Returns:
 - The paint (possibly 
null). 
 - 
setDomainTickBandPaint
Sets the paint for the domain tick bands.- Parameters:
 paint- the paint (nullpermitted).
 - 
getRangeTickBandPaint
Returns the paint used for the range tick bands. If this isnull, no tick bands will be drawn.- Returns:
 - The paint (possibly 
null). 
 - 
setRangeTickBandPaint
Sets the paint for the range tick bands.- Parameters:
 paint- the paint (nullpermitted).
 - 
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). 
 - 
setQuadrantOrigin
Sets the quadrant origin and sends aPlotChangeEventto all registered listeners.- Parameters:
 origin- the origin (nullnot permitted).
 - 
getQuadrantPaint
Returns the paint used for the specified quadrant.- Parameters:
 index- the quadrant index (0-3).- Returns:
 - The paint (possibly 
null). 
 - 
setQuadrantPaint
Sets the paint used for the specified quadrant and sends aPlotChangeEventto all registered listeners.- Parameters:
 index- the quadrant index (0-3).paint- the paint (nullpermitted).
 - 
addDomainMarker
Adds a marker for the domain axis and sends aPlotChangeEventto 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 (nullnot permitted).
 - 
addDomainMarker
Adds a marker for the domain axis in the specified layer and sends aPlotChangeEventto 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 (nullnot permitted).layer- the layer (foreground or background).
 - 
clearDomainMarkers
public void clearDomainMarkers()Clears all the (foreground and background) domain markers and sends aPlotChangeEventto all registered listeners. - 
addDomainMarker
Adds a marker for a renderer and sends aPlotChangeEventto 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 renderer index.marker- the marker.layer- the layer (foreground or background).
 - 
addRangeMarker
Adds a marker for the range axis and sends aPlotChangeEventto 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 (nullnot permitted).
 - 
addRangeMarker
Adds a marker for the range axis in the specified layer and sends aPlotChangeEventto 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 (nullnot permitted).layer- the layer (foreground or background).
 - 
clearRangeMarkers
public void clearRangeMarkers()Clears all the range markers and sends aPlotChangeEventto all registered listeners. - 
addRangeMarker
Adds a marker for a renderer and sends aPlotChangeEventto 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 renderer index.marker- the marker.layer- the layer (foreground or background).
 - 
clearRangeMarkers
public void clearRangeMarkers(int index)Clears the (foreground and background) range markers for a particular renderer.- Parameters:
 index- the renderer index.
 - 
addAnnotation
Adds an annotation to the plot and sends aPlotChangeEventto all registered listeners.- Parameters:
 annotation- the annotation (nullnot permitted).
 - 
clearAnnotations
public void clearAnnotations()Clears all the annotations and sends aPlotChangeEventto all registered listeners. - 
draw
Draws the plot on a Java 2D graphics device (such as the screen or a printer).This plot relies on an
XYItemRendererto draw each item in the plot. This allows the visual representation of the data to be changed easily.The optional info argument collects information about the rendering of the plot (dimensions, tooltip information etc). Just pass in
nullif you do not need this information. - 
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:
 drawin classPlot- Parameters:
 g2- the graphics device.area- the plot area (in Java2D space).anchor- an anchor point in Java2D space (nullpermitted).parentState- the state from the parent plot, if there is one (nullpermitted).info- collects chart drawing information (nullpermitted).
 - 
drawBackground
Draws the background for the plot.- Overrides:
 drawBackgroundin classPlot- Parameters:
 g2- the graphics device.area- the area.
 - 
drawDomainTickBands
Draws the domain tick bands, if any.- Parameters:
 g2- the graphics device.dataArea- the data area.ticks- the ticks.
 - 
drawRangeTickBands
Draws the range tick bands, if any.- Parameters:
 g2- the graphics device.dataArea- the data area.ticks- the ticks.
 - 
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
infoandcrosshairStatearguments may benull.- 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 (nullpermitted).- Returns:
 - A flag that indicates whether any data was actually rendered.
 
 - 
getDomainAxisForDataset
Returns the domain axis for a dataset.- Parameters:
 index- the dataset index.- Returns:
 - the axis
 
 - 
getRangeAxisForDataset
Returns the range axis for a dataset.- Parameters:
 index- the dataset index.- Returns:
 - The axis
 
 - 
drawAnnotations
Draws the annotations for the plot.- Parameters:
 g2- the graphics device.dataArea- the data area.info- the chart rendering info.
 - 
getDomainMarkers
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.
 
 - 
getRangeMarkers
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.
 
 - 
getDomainMarkers
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). 
 - 
getRangeMarkers
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). 
 - 
handleClick
Handles a 'click' on the plot by updating the anchor values...- Overrides:
 handleClickin classPlot- 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.
 - 
zoom
public void zoom(double percent)Zooms the axis ranges by the specified percentage about the anchor point. - 
getDataRange
Returns the range for the specified axis.- Specified by:
 getDataRangein interfaceValueAxisPlot- Parameters:
 axis- the axis.- Returns:
 - The range.
 
 - 
datasetChanged
Receives notification of a change to the plot's dataset.The axis ranges are updated if necessary.
- Specified by:
 datasetChangedin interfaceDatasetChangeListener- Overrides:
 datasetChangedin classPlot- Parameters:
 event- information about the event (not used here).
 - 
rendererChanged
Receives notification of a renderer change event.- Specified by:
 rendererChangedin interfaceRendererChangeListener- Parameters:
 event- the event.
 - 
isDomainCrosshairVisible
public boolean isDomainCrosshairVisible()Returns a flag indicating whether or not the domain crosshair is visible.- Returns:
 - the flag.
 
 - 
setDomainCrosshairVisible
public void setDomainCrosshairVisible(boolean flag)Sets the flag indicating whether or not the domain crosshair is visible.- Parameters:
 flag- the new value of the flag.
 - 
isDomainCrosshairLockedOnData
public boolean isDomainCrosshairLockedOnData()Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.- Returns:
 - the flag.
 
 - 
setDomainCrosshairLockedOnData
public void setDomainCrosshairLockedOnData(boolean flag)Sets the flag indicating whether or not the domain crosshair should "lock-on" to actual data values.- Parameters:
 flag- the flag.
 - 
getDomainCrosshairValue
public double getDomainCrosshairValue()Returns the domain crosshair value.- Returns:
 - the value.
 
 - 
setDomainCrosshairValue
public void setDomainCrosshairValue(double value)Sets the domain crosshair value and sends aPlotChangeEventto all registered listeners (provided that the domain crosshair is visible).- Parameters:
 value- the value.
 - 
setDomainCrosshairValue
public void setDomainCrosshairValue(double value, boolean notify)Sets the domain crosshair value and, if requested, sends aPlotChangeEventto all registered listeners (provided that the domain crosshair is visible).- Parameters:
 value- the new value.notify- notify listeners?
 - 
getDomainCrosshairStroke
Returns theStrokeused to draw the crosshair (if visible).- Returns:
 - the crosshair stroke.
 
 - 
setDomainCrosshairStroke
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.
 - 
getDomainCrosshairPaint
Returns the domain crosshair color.- Returns:
 - the crosshair color.
 
 - 
setDomainCrosshairPaint
Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.- Parameters:
 paint- the new crosshair paint.
 - 
isRangeCrosshairVisible
public boolean isRangeCrosshairVisible()Returns a flag indicating whether or not the range crosshair is visible.- Returns:
 - the flag.
 
 - 
setRangeCrosshairVisible
public void setRangeCrosshairVisible(boolean flag)Sets the flag indicating whether or not the range crosshair is visible.- Parameters:
 flag- the new value of the flag.
 - 
isRangeCrosshairLockedOnData
public boolean isRangeCrosshairLockedOnData()Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.- Returns:
 - the flag.
 
 - 
setRangeCrosshairLockedOnData
public void setRangeCrosshairLockedOnData(boolean flag)Sets the flag indicating whether or not the range crosshair should "lock-on" to actual data values.- Parameters:
 flag- the flag.
 - 
getRangeCrosshairValue
public double getRangeCrosshairValue()Returns the range crosshair value.- Returns:
 - The value.
 
 - 
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:
 value- the new value.
 - 
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:
 value- the new value.notify- a flag that controls whether or not listeners are notified.
 - 
getRangeCrosshairStroke
Returns the Stroke used to draw the crosshair (if visible).- Returns:
 - the crosshair stroke.
 
 - 
setRangeCrosshairStroke
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.
 - 
getRangeCrosshairPaint
Returns the range crosshair color.- Returns:
 - the crosshair color.
 
 - 
setRangeCrosshairPaint
Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.- Parameters:
 paint- the new crosshair paint.
 - 
getFixedDomainAxisSpace
Returns the fixed domain axis space.- Returns:
 - The fixed domain axis space (possibly 
null). 
 - 
setFixedDomainAxisSpace
Sets the fixed domain axis space.- Parameters:
 space- the space.
 - 
getFixedRangeAxisSpace
Returns the fixed range axis space.- Returns:
 - The fixed range axis space.
 
 - 
setFixedRangeAxisSpace
Sets the fixed range axis space.- Parameters:
 space- the space.
 - 
zoomHorizontalAxes
public void zoomHorizontalAxes(double factor)Multiplies the range on the horizontal axis/axes by the specified factor.- Specified by:
 zoomHorizontalAxesin interfaceValueAxisPlot- Parameters:
 factor- the zoom factor.
 - 
zoomHorizontalAxes
public void zoomHorizontalAxes(double lowerPercent, double upperPercent)Zooms in on the horizontal 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.- Specified by:
 zoomHorizontalAxesin interfaceValueAxisPlot- 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).
 - 
zoomVerticalAxes
public void zoomVerticalAxes(double factor)Multiplies the range on the vertical axis/axes by the specified factor.- Specified by:
 zoomVerticalAxesin interfaceValueAxisPlot- Parameters:
 factor- the zoom factor.
 - 
zoomVerticalAxes
public void zoomVerticalAxes(double lowerPercent, double upperPercent)Zooms in on the vertical axes.- Specified by:
 zoomVerticalAxesin interfaceValueAxisPlot- Parameters:
 lowerPercent- the lower bound.upperPercent- the upper bound.
 - 
getSeriesCount
public int getSeriesCount()Returns the number of series in the primary dataset for this plot. If the dataset isnull, the method returns 0.- Returns:
 - The series count.
 
 - 
getFixedLegendItems
Returns the fixed legend items, if any.- Returns:
 - The legend items (possibly 
null). 
 - 
setFixedLegendItems
Sets the fixed legend items for the plot. Leave this set tonullif you prefer the legend items to be created automatically.- Parameters:
 items- the legend items (nullpermitted).
 - 
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:
 getLegendItemsin classPlot- Returns:
 - The legend items.
 
 - 
equals
Tests this plot for equality with another object. - 
clone
Returns a clone of the plot.- Overrides:
 clonein classPlot- Returns:
 - A clone.
 - Throws:
 CloneNotSupportedException- this can occur if some component of the plot cannot be cloned.
 
 -