java.lang.Object | ||
↳ | org.jfree.chart.plot.Plot | |
↳ | org.jfree.chart.plot.XYPlot |
![]() |
A general class for plotting data in the form of (x, y) pairs. This plot can
use data from any class that implements the XYDataset
interface.
XYPlot
makes use of an XYItemRenderer
to draw each point
on the plot. By using different renderers, various chart types can be
produced.
The ChartFactory
class contains static methods for
creating pre-configured charts.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | DEFAULT_CROSSHAIR_VISIBLE | The default crosshair visibility. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DEFAULT_CROSSHAIR_PAINT | The default crosshair paint. | ||||||||||
DEFAULT_CROSSHAIR_STROKE | The default crosshair stroke. | ||||||||||
DEFAULT_GRIDLINE_PAINT | The default grid line paint. | ||||||||||
DEFAULT_GRIDLINE_STROKE | The default grid line stroke. | ||||||||||
localizationResources | The resourceBundle for the localization. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new
XYPlot instance with no dataset, no axes and
no renderer. | |||||||||||
Creates a new plot with the specified dataset, axes and renderer.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds an annotation to the plot and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Adds an annotation to the plot and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for a specific dataset/renderer and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for the domain axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Adds a marker for the domain axis in the specified layer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for a specific dataset/renderer and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for the range axis and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Adds a marker for the range axis in the specified layer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Adds a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Clears all the annotations and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Clears the domain axes from the plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Clears the (foreground and background) domain markers for a particular
renderer.
| |||||||||||
Clears all the (foreground and background) domain markers and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Clears the range axes from the plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Clears the (foreground and background) range markers for a particular
renderer.
| |||||||||||
Clears all the range markers and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Returns a clone of the plot.
| |||||||||||
Configures the domain axes.
| |||||||||||
Configures the range axes.
| |||||||||||
Receives notification of a change to the plot's dataset.
| |||||||||||
Draws the plot within the specified area on a graphics device.
| |||||||||||
Draws the annotations for the plot.
| |||||||||||
Draws the background for the plot.
| |||||||||||
Draws the domain tick bands, if any.
| |||||||||||
Draws the range tick bands, if any.
| |||||||||||
Tests this plot for equality with another object.
| |||||||||||
Returns the list of annotations.
| |||||||||||
Returns the axis offset.
| |||||||||||
Returns the range for the specified axis.
| |||||||||||
Returns a dataset.
| |||||||||||
Returns the primary dataset for the plot.
| |||||||||||
Returns the number of datasets.
| |||||||||||
Returns the dataset rendering order.
| |||||||||||
Returns the domain axis with the specified index, or
null . | |||||||||||
Returns the domain axis with index 0.
| |||||||||||
Returns the number of domain axes.
| |||||||||||
Returns the edge for a domain axis.
| |||||||||||
Returns the edge for the primary domain axis (taking into account the
plot's orientation).
| |||||||||||
Returns the domain axis for a dataset.
| |||||||||||
Returns the index of the given domain axis.
| |||||||||||
Returns the location for a domain axis.
| |||||||||||
Returns the location of the primary domain axis.
| |||||||||||
Returns the domain crosshair paint.
| |||||||||||
Returns the
Stroke used to draw the crosshair (if visible). | |||||||||||
Returns the domain crosshair value.
| |||||||||||
Returns the paint for the grid lines (if any) plotted against the domain
axis.
| |||||||||||
Returns the stroke for the grid-lines (if any) plotted against the
domain axis.
| |||||||||||
Returns a collection of domain markers for a particular renderer and
layer.
| |||||||||||
Returns the list of domain markers (read only) for the specified layer.
| |||||||||||
Returns the paint for the minor grid lines (if any) plotted against the
domain axis.
| |||||||||||
Returns the stroke for the minor grid-lines (if any) plotted against the
domain axis.
| |||||||||||
Returns the paint used for the domain tick bands.
| |||||||||||
Returns the paint for the zero baseline (if any) plotted against the
domain axis.
| |||||||||||
Returns the stroke used for the zero baseline against the domain axis.
| |||||||||||
Returns the fixed domain axis space.
| |||||||||||
Returns the fixed legend items, if any.
| |||||||||||
Returns the fixed range axis space.
| |||||||||||
Returns the index of the specified renderer, or
-1 if the
renderer is not assigned to this plot. | |||||||||||
Returns the legend items for the plot.
| |||||||||||
Returns the orientation of the plot.
| |||||||||||
Returns the plot type as a string.
| |||||||||||
Returns the origin for the quadrants that can be displayed on the plot.
| |||||||||||
Returns the paint used for the specified quadrant.
| |||||||||||
Returns a range axis.
| |||||||||||
Returns the range axis for the plot.
| |||||||||||
Returns the number of range axes.
| |||||||||||
Returns the edge for the primary range axis.
| |||||||||||
Returns the edge for a range axis.
| |||||||||||
Returns the range axis for a dataset.
| |||||||||||
Returns the index of the given range axis.
| |||||||||||
Returns the location for a range axis.
| |||||||||||
Returns the location of the primary range axis.
| |||||||||||
Returns the range crosshair paint.
| |||||||||||
Returns the stroke used to draw the crosshair (if visible).
| |||||||||||
Returns the range crosshair value.
| |||||||||||
Returns the paint for the grid lines (if any) plotted against the range
axis.
| |||||||||||
Returns the stroke for the grid lines (if any) plotted against the
range axis.
| |||||||||||
Returns a collection of range markers for a particular renderer and
layer.
| |||||||||||
Returns the list of range markers (read only) for the specified layer.
| |||||||||||
Returns the paint for the minor grid lines (if any) plotted against the range
axis.
| |||||||||||
Returns the stroke for the minor grid lines (if any) plotted against the
range axis.
| |||||||||||
Returns the paint used for the range tick bands.
| |||||||||||
Returns the paint for the zero baseline (if any) plotted against the
range axis.
| |||||||||||
Returns the stroke used for the zero baseline against the range axis.
| |||||||||||
Returns the renderer for a dataset, or
null . | |||||||||||
Returns the renderer for the primary dataset.
| |||||||||||
Returns the number of renderer slots for this plot.
| |||||||||||
Returns the renderer for the specified dataset.
| |||||||||||
Returns the number of series in the primary dataset for this plot.
| |||||||||||
Returns the series rendering order.
| |||||||||||
Returns the weight for this plot when it is used as a subplot within a
combined plot.
| |||||||||||
Handles a 'click' on the plot by updating the anchor values.
| |||||||||||
Returns the index of the specified dataset, or
-1 if the
dataset does not belong to the plot. | |||||||||||
Returns a flag indicating whether or not the crosshair should "lock-on"
to actual data values.
| |||||||||||
Returns a flag indicating whether or not the domain crosshair is visible.
| |||||||||||
Returns
true if the domain gridlines are visible, and
false | |||||||||||
Returns
true if the domain minor gridlines are visible, and
false | |||||||||||
Returns
true if panning is enabled for the domain axes,
and false otherwise. | |||||||||||
Returns a flag that controls whether or not a zero baseline is
displayed for the domain axis.
| |||||||||||
Returns
true , indicating that the domain axis/axes for this
plot are zoomable. | |||||||||||
Returns a flag indicating whether or not the crosshair should "lock-on"
to actual data values.
| |||||||||||
Returns a flag indicating whether or not the range crosshair is visible.
| |||||||||||
Returns
true if the range axis grid is visible, and
false | |||||||||||
Returns
true if the range axis minor grid is visible, and
false | |||||||||||
Returns
true if panning is enabled for the range axes,
and false otherwise. | |||||||||||
Returns a flag that controls whether or not a zero baseline is
displayed for the range axis.
| |||||||||||
Returns
true , indicating that the range axis/axes for this
plot are zoomable. | |||||||||||
Maps the specified dataset to the axes in the list.
| |||||||||||
Maps a dataset to a particular domain axis.
| |||||||||||
Maps the specified dataset to the axes in the list.
| |||||||||||
Maps a dataset to a particular range axis.
| |||||||||||
Pans the domain axes by the specified percentage.
| |||||||||||
Pans the range axes by the specified percentage.
| |||||||||||
Removes an annotation from the plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Removes an annotation from the plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Removes a marker for the domain axis in the specified layer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Removes a marker for the domain axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Removes a marker for a specific dataset/renderer and, if requested,
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Removes a marker for the range axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Removes a marker for the range axis in the specified layer and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Draws a representation of the data within the dataArea region, using the
current renderer.
| |||||||||||
Receives notification of a renderer change event.
| |||||||||||
Sets the axis offsets (gap between the data area and the axes) and sends
a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the primary dataset for the plot, replacing the existing dataset if
there is one.
| |||||||||||
Sets a dataset for the plot.
| |||||||||||
Sets the rendering order and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the domain axes for this plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets a domain axis and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the domain axis for the plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets a domain axis and, if requested, sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the axis location for a domain axis and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the location for a domain axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the location of the domain axis and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the location of the primary domain axis and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the flag indicating whether or not the domain crosshair should
"lock-on" to actual data values.
| |||||||||||
Sets the paint used to draw the crosshairs (if visible) and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the Stroke used to draw the crosshairs (if visible) and notifies
registered listeners that the axis has been modified.
| |||||||||||
Sets the domain crosshair value and, if requested, sends a
PlotChangeEvent to all registered listeners (provided that the
domain crosshair is visible). | |||||||||||
Sets the domain crosshair value and sends a
PlotChangeEvent to
all registered listeners (provided that the domain crosshair is visible). | |||||||||||
Sets the flag indicating whether or not the domain crosshair is visible
and, if the flag changes, sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the paint for the grid lines plotted against the domain axis, and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the stroke for the grid lines plotted against the domain axis, and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the flag that controls whether or not the domain grid-lines are
visible.
| |||||||||||
Sets the paint for the minor grid lines plotted against the domain axis,
and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the stroke for the minor grid lines plotted against the domain
axis, and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the flag that controls whether or not the domain minor grid-lines
are visible.
| |||||||||||
Sets the flag that enables or disables panning of the plot along the
domain axes.
| |||||||||||
Sets the paint for the domain tick bands.
| |||||||||||
Sets the paint for the zero baseline plotted against the domain axis and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the stroke for the zero baseline for the domain axis,
and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
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. | |||||||||||
Sets the fixed domain axis space and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the fixed domain axis space and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the fixed legend items for the plot.
| |||||||||||
Sets the fixed range axis space and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the fixed range axis space and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the orientation for the plot and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the quadrant origin and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the paint used for the specified quadrant and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the range axes for this plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets a range axis and, if requested, sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets the range axis for the plot and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Sets a range axis and sends a
PlotChangeEvent to all registered
listeners. | |||||||||||
Sets the axis location for a domain axis and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the location of the primary range axis and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the location of the primary range axis and, if requested, sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the location for a range axis and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the flag indicating whether or not the range crosshair should
"lock-on" to actual data values.
| |||||||||||
Sets the paint used to color the crosshairs (if visible) and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the stroke used to draw the crosshairs (if visible) and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the range crosshair value.
| |||||||||||
Sets the range crosshair value and sends a
PlotChangeEvent to
all registered listeners, but only if the crosshair is visible. | |||||||||||
Sets the flag indicating whether or not the range crosshair is visible.
| |||||||||||
Sets the paint for the grid lines plotted against the range axis and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the stroke for the grid lines plotted against the range axis,
and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the flag that controls whether or not the range axis grid lines
are visible.
| |||||||||||
Sets the paint for the minor grid lines plotted against the range axis
and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the stroke for the minor grid lines plotted against the range axis,
and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the flag that controls whether or not the range axis minor grid
lines are visible.
| |||||||||||
Sets the flag that enables or disables panning of the plot along
the range axes.
| |||||||||||
Sets the paint for the range tick bands.
| |||||||||||
Sets the paint for the zero baseline plotted against the range axis and
sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the stroke for the zero baseline for the range axis,
and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
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. | |||||||||||
Sets a renderer and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets a renderer and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the renderer for the primary dataset and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the renderers for this plot and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the series order and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the weight for the plot and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Multiplies the range on the domain axis/axes by the specified factor.
| |||||||||||
Multiplies the range on the domain axis/axes by the specified factor.
| |||||||||||
Zooms in on the domain axis/axes.
| |||||||||||
Multiplies the range on the range axis/axes by the specified factor.
| |||||||||||
Zooms in on the range axes.
| |||||||||||
Multiplies the range on the range axis/axes by the specified factor.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calculates the space required for all the axes in the plot.
| |||||||||||
Calculates the space required for the domain axis/axes.
| |||||||||||
Calculates the space required for the range axis/axes.
| |||||||||||
A utility method for drawing the axes.
| |||||||||||
Draws a domain crosshair.
| |||||||||||
Draws the gridlines for the plot, if they are visible.
| |||||||||||
Draws the domain markers (if any) for an axis and layer.
| |||||||||||
Utility method for drawing a horizontal line across the data area of the
plot.
| |||||||||||
Draws the quadrants.
| |||||||||||
Draws a range crosshair.
| |||||||||||
Draws the gridlines for the plot's primary range axis, if they are
visible.
| |||||||||||
Draws the range markers (if any) for a renderer and layer.
| |||||||||||
Utility method for drawing a vertical line on the data area of the plot.
| |||||||||||
Draws a base line across the chart at value zero on the domain axis.
| |||||||||||
Draws a base line across the chart at value zero on the range axis.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
The default crosshair visibility.
Creates a new XYPlot
instance with no dataset, no axes and
no renderer. You should specify these items before using the plot.
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).
dataset | the dataset (null permitted). |
---|---|
domainAxis | the domain axis (null permitted). |
rangeAxis | the range axis (null permitted). |
renderer | the renderer (null permitted).
|
Adds an annotation to the plot and sends a PlotChangeEvent
to
all registered listeners.
annotation | the annotation (null not permitted). |
---|
Adds an annotation to the plot and, if requested, sends a
PlotChangeEvent
to all registered listeners.
annotation | the annotation (null not permitted). |
---|---|
notify | notify listeners? |
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.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
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.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
notify | notify listeners? |
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.
marker | the marker (null not permitted). |
---|
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.
marker | the marker (null not permitted). |
---|---|
layer | the layer (foreground or background). |
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.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
notify | notify listeners? |
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.
marker | the marker (null not permitted). |
---|
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.
marker | the marker (null not permitted). |
---|---|
layer | the layer (foreground or background). |
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.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
Clears all the annotations and sends a PlotChangeEvent
to all
registered listeners.
Clears the domain axes from the plot and sends a PlotChangeEvent
to all registered listeners.
Clears the (foreground and background) domain markers for a particular renderer.
index | the renderer index. |
---|
Clears all the (foreground and background) domain markers and sends a
PlotChangeEvent
to all registered listeners.
Clears the range axes from the plot and sends a PlotChangeEvent
to all registered listeners.
Clears the (foreground and background) range markers for a particular renderer.
index | the renderer index. |
---|
Clears all the range markers and sends a PlotChangeEvent
to all
registered listeners.
Returns a clone of the plot.
CloneNotSupportedException | this can occur if some component of the plot cannot be cloned. |
---|
Configures the domain axes.
Receives notification of a change to the plot's dataset.
The axis ranges are updated if necessary.
event | information about the event (not used here). |
---|
Draws the plot within the specified area on a graphics device.
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).
|
Draws the annotations for the plot.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
info | the chart rendering info. |
Draws the background for the plot.
g2 | the graphics device. |
---|---|
area | the area. |
Draws the domain tick bands, if any.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
ticks | the ticks. |
Draws the range tick bands, if any.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
ticks | the ticks. |
Tests this plot for equality with another object.
obj | the object (null permitted). |
---|
true
or false
.
Returns the list of annotations.
Returns the axis offset.
null
).Returns the range for the specified axis.
axis | the axis. |
---|
Returns a dataset.
index | the dataset index. |
---|
null
).Returns the primary dataset for the plot.
null
).Returns the number of datasets.
Returns the dataset rendering order.
null
).Returns the domain axis with the specified index, or null
.
index | the axis index. |
---|
null
possible).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).
null
).Returns the edge for a domain axis.
index | the axis index. |
---|
Returns the edge for the primary domain axis (taking into account the plot's orientation).
Returns the domain axis for a dataset.
index | the dataset index. |
---|
Returns the index of the given domain axis.
axis | the axis. |
---|
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.
index | the axis index. |
---|
null
).Returns the location of the primary domain axis.
null
).Returns the domain crosshair paint.
null
).Returns the Stroke
used to draw the crosshair (if visible).
null
).Returns the paint for the grid lines (if any) plotted against the domain axis.
null
).Returns the stroke for the grid-lines (if any) plotted against the domain axis.
null
).Returns a collection of domain markers for a particular renderer and layer.
index | the renderer index. |
---|---|
layer | the layer. |
null
).Returns the list of domain markers (read only) for the specified layer.
layer | the layer (foreground or background). |
---|
Returns the paint for the minor grid lines (if any) plotted against the domain axis.
null
).Returns the stroke for the minor grid-lines (if any) plotted against the domain axis.
null
).Returns the paint used for the domain tick bands. If this is
null
, no tick bands will be drawn.
null
).Returns the paint for the zero baseline (if any) plotted against the domain axis.
null
).Returns the stroke used for the zero baseline against the domain axis.
null
).Returns the fixed domain axis space.
null
).Returns the fixed legend items, if any.
null
).Returns the fixed range axis space.
null
).Returns the index of the specified renderer, or -1
if the
renderer is not assigned to this plot.
renderer | the renderer (null permitted). |
---|
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 orientation of the plot.
null
).Returns the plot type as a string.
Returns the origin for the quadrants that can be displayed on the plot. This defaults to (0, 0).
null
).Returns the paint used for the specified quadrant.
index | the quadrant index (0-3). |
---|
null
).Returns a range axis.
index | the axis index. |
---|
null
possible).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 edge for the primary range axis.
Returns the edge for a range axis.
index | the axis index. |
---|
Returns the range axis for a dataset.
index | the dataset index. |
---|
Returns the index of the given range axis.
axis | the axis. |
---|
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.
index | the axis index. |
---|
null
).Returns the location of the primary range axis.
null
).Returns the range crosshair paint.
null
).Returns the stroke used to draw the crosshair (if visible).
null
).Returns the paint for the grid lines (if any) plotted against the range axis.
null
).Returns the stroke for the grid lines (if any) plotted against the range axis.
null
).Returns a collection of range markers for a particular renderer and layer.
index | the renderer index. |
---|---|
layer | the layer. |
null
).Returns the list of range markers (read only) for the specified layer.
layer | the layer (foreground or background). |
---|
Returns the paint for the minor grid lines (if any) plotted against the range axis.
null
).Returns the stroke for the minor grid lines (if any) plotted against the range axis.
null
).Returns the paint used for the range tick bands. If this is
null
, no tick bands will be drawn.
null
).Returns the paint for the zero baseline (if any) plotted against the range axis.
null
).Returns the stroke used for the zero baseline against the range axis.
null
).Returns the renderer for a dataset, or null
.
index | the renderer index. |
---|
null
).Returns the renderer for the primary dataset.
null
).Returns the number of renderer slots for this plot.
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).
dataset | the dataset (null permitted). |
---|
null
).
Returns the number of series in the primary dataset for this plot. If
the dataset is null
, the method returns 0.
Returns the series rendering order.
null
).Returns the weight for this plot when it is used as a subplot within a combined plot.
Handles a 'click' on the plot by updating the anchor values.
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. |
Returns the index of the specified dataset, or -1
if the
dataset does not belong to the plot.
dataset | the dataset (null not permitted). |
---|
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
Returns a flag indicating whether or not the domain crosshair is visible.
Returns true
if the domain gridlines are visible, and
false
otherwise.
true
or false
.Returns true
if the domain minor gridlines are visible, and
false
otherwise.
true
or false
.Returns true
if panning is enabled for the domain axes,
and false
otherwise.
Returns a flag that controls whether or not a zero baseline is displayed for the domain axis.
Returns true
, indicating that the domain axis/axes for this
plot are zoomable.
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
Returns a flag indicating whether or not the range crosshair is visible.
Returns true
if the range axis grid is visible, and
false
otherwise.
Returns true
if the range axis minor grid is visible, and
false
otherwise.
Returns true
if panning is enabled for the range axes,
and false
otherwise.
Returns a flag that controls whether or not a zero baseline is displayed for the range axis.
Returns true
, indicating that the range axis/axes for this
plot are zoomable.
Maps the specified dataset to the axes in the list. Note that the conversion of data values into Java2D space is always performed using the first axis in the list.
index | the dataset index (zero-based). |
---|---|
axisIndices | the axis indices (null permitted). |
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.
index | the dataset index (zero-based). |
---|---|
axisIndex | the axis index. |
Maps the specified dataset to the axes in the list. Note that the conversion of data values into Java2D space is always performed using the first axis in the list.
index | the dataset index (zero-based). |
---|---|
axisIndices | the axis indices (null permitted). |
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.
index | the dataset index (zero-based). |
---|---|
axisIndex | the axis index. |
Pans the domain axes by the specified percentage.
percent | the distance to pan (as a percentage of the axis length). |
---|---|
info | the plot info |
source | the source point where the pan action started. |
Pans the range axes by the specified percentage.
percent | the distance to pan (as a percentage of the axis length). |
---|---|
info | the plot info |
source | the source point where the pan action started. |
Removes an annotation from the plot and sends a PlotChangeEvent
to all registered listeners.
annotation | the annotation (null not permitted). |
---|
Removes an annotation from the plot and sends a PlotChangeEvent
to all registered listeners.
annotation | the annotation (null not permitted). |
---|---|
notify | notify listeners? |
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent
to all registered listeners.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
Removes a marker for the domain axis in the specified layer and sends a
PlotChangeEvent
to all registered listeners.
marker | the marker (null not permitted). |
---|---|
layer | the layer (foreground or background). |
Removes a marker for the domain axis and sends a PlotChangeEvent
to all registered listeners.
marker | the marker. |
---|
Removes a marker for a specific dataset/renderer and, if requested,
sends a PlotChangeEvent
to all registered listeners.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
notify | notify listeners? |
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent
to all registered listeners.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
notify | notify listeners? |
Removes a marker for the range axis and sends a PlotChangeEvent
to all registered listeners.
marker | the marker. |
---|
Removes a marker for a specific dataset/renderer and sends a
PlotChangeEvent
to all registered listeners.
index | the dataset/renderer index. |
---|---|
marker | the marker. |
layer | the layer (foreground or background). |
Removes a marker for the range axis in the specified layer and sends a
PlotChangeEvent
to all registered listeners.
marker | the marker (null not permitted). |
---|---|
layer | the layer (foreground or background). |
Draws a representation of the data within the dataArea region, using the current renderer.
The info
and crosshairState
arguments may be
null
.
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). |
Receives notification of a renderer change event.
event | the event. |
---|
Sets the axis offsets (gap between the data area and the axes) and sends
a PlotChangeEvent
to all registered listeners.
offset | the offset (null not permitted). |
---|
Sets the primary dataset for the plot, replacing the existing dataset if there is one.
dataset | the dataset (null permitted). |
---|
Sets a dataset for the plot.
index | the dataset index. |
---|---|
dataset | the dataset (null permitted). |
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.
order | the rendering order (null not permitted). |
---|
Sets the domain axes for this plot and sends a PlotChangeEvent
to all registered listeners.
axes | the axes (null not permitted). |
---|
Sets a domain axis and sends a PlotChangeEvent
to all
registered listeners.
index | the axis index. |
---|---|
axis | the axis (null permitted). |
Sets the domain axis for the plot and sends a PlotChangeEvent
to all registered listeners.
axis | the new axis (null permitted). |
---|
Sets a domain axis and, if requested, sends a PlotChangeEvent
to
all registered listeners.
index | the axis index. |
---|---|
axis | the axis. |
notify | notify listeners? |
Sets the axis location for a domain axis and, if requested, sends a
PlotChangeEvent
to all registered listeners.
index | the axis index. |
---|---|
location | the location (null not permitted for
index 0). |
notify | notify listeners? |
Sets the location for a domain axis and sends a PlotChangeEvent
to all registered listeners.
index | the axis index. |
---|---|
location | the location (null not permitted for index
0). |
Sets the location of the domain axis and, if requested, sends a
PlotChangeEvent
to all registered listeners.
location | the location (null not permitted). |
---|---|
notify | notify listeners? |
Sets the location of the primary domain axis and sends a
PlotChangeEvent
to all registered listeners.
location | the location (null not permitted). |
---|
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.
flag | the flag. |
---|
Sets the paint used to draw the crosshairs (if visible) and sends a
PlotChangeEvent
to all registered listeners.
paint | the new crosshair paint (null not permitted). |
---|
Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
stroke | the new crosshair stroke (null not
permitted). |
---|
Sets the domain crosshair value and, if requested, sends a
PlotChangeEvent
to all registered listeners (provided that the
domain crosshair is visible).
value | the new value. |
---|---|
notify | notify listeners? |
Sets the domain crosshair value and sends a PlotChangeEvent
to
all registered listeners (provided that the domain crosshair is visible).
value | the value. |
---|
Sets the flag indicating whether or not the domain crosshair is visible
and, if the flag changes, sends a PlotChangeEvent
to all
registered listeners.
flag | the new value of the flag. |
---|
Sets the paint for the grid lines plotted against the domain axis, and
sends a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
IllegalArgumentException | if paint is
null . |
---|
Sets the stroke for the grid lines plotted against the domain axis, and
sends a PlotChangeEvent
to all registered listeners.
stroke | the stroke (null not permitted). |
---|
IllegalArgumentException | if stroke is
null . |
---|
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.
visible | the new value of the flag. |
---|
Sets the paint for the minor grid lines plotted against the domain axis,
and sends a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
IllegalArgumentException | if paint is
null . |
---|
Sets the stroke for the minor grid lines plotted against the domain
axis, and sends a PlotChangeEvent
to all registered listeners.
stroke | the stroke (null not permitted). |
---|
IllegalArgumentException | if stroke is
null . |
---|
Sets the flag that controls whether or not the domain minor grid-lines are visible.
If the flag value is changed, a PlotChangeEvent
is sent to all
registered listeners.
visible | the new value of the flag. |
---|
Sets the flag that enables or disables panning of the plot along the domain axes.
pannable | the new flag value. |
---|
Sets the paint for the domain tick bands.
paint | the paint (null permitted). |
---|
Sets the paint for the zero baseline plotted against the domain axis and
sends a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Sets the stroke for the zero baseline for the domain axis,
and sends a PlotChangeEvent
to all registered listeners.
stroke | the stroke (null not permitted). |
---|
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.
visible | the flag. |
---|
Sets the fixed domain axis space and sends a PlotChangeEvent
to
all registered listeners.
space | the space (null permitted). |
---|
Sets the fixed domain axis space and, if requested, sends a
PlotChangeEvent
to all registered listeners.
space | the space (null permitted). |
---|---|
notify | notify listeners? |
Sets the fixed legend items for the plot. Leave this set to
null
if you prefer the legend items to be created
automatically.
items | the legend items (null permitted). |
---|
Sets the fixed range axis space and, if requested, sends a
PlotChangeEvent
to all registered listeners.
space | the space (null permitted). |
---|---|
notify | notify listeners? |
Sets the fixed range axis space and sends a PlotChangeEvent
to
all registered listeners.
space | the space (null permitted). |
---|
Sets the orientation for the plot and sends a PlotChangeEvent
to
all registered listeners.
orientation | the orientation (null not allowed). |
---|
Sets the quadrant origin and sends a PlotChangeEvent
to all
registered listeners.
origin | the origin (null not permitted). |
---|
Sets the paint used for the specified quadrant and sends a
PlotChangeEvent
to all registered listeners.
index | the quadrant index (0-3). |
---|---|
paint | the paint (null permitted). |
Sets the range axes for this plot and sends a PlotChangeEvent
to all registered listeners.
axes | the axes (null not permitted). |
---|
Sets a range axis and, if requested, sends a PlotChangeEvent
to
all registered listeners.
index | the axis index. |
---|---|
axis | the axis (null permitted). |
notify | notify listeners? |
Sets the range axis for the plot and sends a PlotChangeEvent
to
all registered listeners.
axis | the axis (null permitted). |
---|
Sets a range axis and sends a PlotChangeEvent
to all registered
listeners.
index | the axis index. |
---|---|
axis | the axis (null permitted). |
Sets the axis location for a domain axis and, if requested, sends a
PlotChangeEvent
to all registered listeners.
index | the axis index. |
---|---|
location | the location (null not permitted for
index 0). |
notify | notify listeners? |
Sets the location of the primary range axis and sends a
PlotChangeEvent
to all registered listeners.
location | the location (null not permitted). |
---|
Sets the location of the primary range axis and, if requested, sends a
PlotChangeEvent
to all registered listeners.
location | the location (null not permitted). |
---|---|
notify | notify listeners? |
Sets the location for a range axis and sends a PlotChangeEvent
to all registered listeners.
index | the axis index. |
---|---|
location | the location (null permitted). |
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.
flag | the flag. |
---|
Sets the paint used to color the crosshairs (if visible) and sends a
PlotChangeEvent
to all registered listeners.
paint | the new crosshair paint (null not permitted). |
---|
Sets the stroke used to draw the crosshairs (if visible) and sends a
PlotChangeEvent
to all registered listeners.
stroke | the new crosshair stroke (null not
permitted). |
---|
Sets the range crosshair value.
Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.
value | the new value. |
---|
Sets the range crosshair value and sends a PlotChangeEvent
to
all registered listeners, but only if the crosshair is visible.
value | the new value. |
---|---|
notify | a flag that controls whether or not listeners are notified. |
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.
flag | the new value of the flag. |
---|
Sets the paint for the grid lines plotted against the range axis and
sends a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Sets the stroke for the grid lines plotted against the range axis,
and sends a PlotChangeEvent
to all registered listeners.
stroke | the stroke (null not permitted). |
---|
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.
visible | the new value of the flag. |
---|
Sets the paint for the minor grid lines plotted against the range axis
and sends a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Sets the stroke for the minor grid lines plotted against the range axis,
and sends a PlotChangeEvent
to all registered listeners.
stroke | the stroke (null not permitted). |
---|
Sets the flag that controls whether or not the range axis minor grid lines are visible.
If the flag value is changed, a PlotChangeEvent
is sent to all
registered listeners.
visible | the new value of the flag. |
---|
Sets the flag that enables or disables panning of the plot along the range axes.
pannable | the new flag value. |
---|
Sets the paint for the range tick bands.
paint | the paint (null permitted). |
---|
Sets the paint for the zero baseline plotted against the range axis and
sends a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Sets the stroke for the zero baseline for the range axis,
and sends a PlotChangeEvent
to all registered listeners.
stroke | the stroke (null not permitted). |
---|
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.
visible | the flag. |
---|
Sets a renderer and sends a PlotChangeEvent
to all
registered listeners.
index | the index. |
---|---|
renderer | the renderer. |
Sets a renderer and sends a PlotChangeEvent
to all
registered listeners.
index | the index. |
---|---|
renderer | the renderer. |
notify | notify listeners? |
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.
renderer | the renderer (null permitted). |
---|
Sets the renderers for this plot and sends a PlotChangeEvent
to all registered listeners.
renderers | the renderers (null not permitted).
|
---|
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.
order | the rendering order (null not permitted). |
---|
Sets the weight for the plot and sends a PlotChangeEvent
to all
registered listeners.
weight | the weight. |
---|
Multiplies the range on the domain axis/axes by the specified factor.
factor | the zoom factor. |
---|---|
info | the plot rendering info. |
source | the source point (in Java2D space). |
useAnchor | use source point as zoom anchor? |
Multiplies the range on the domain axis/axes by the specified factor.
factor | the zoom factor. |
---|---|
info | the plot rendering info. |
source | the source point (in Java2D space). |
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.
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). |
Multiplies the range on the range axis/axes by the specified factor.
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. |
Zooms in on the range axes.
lowerPercent | the lower bound. |
---|---|
upperPercent | the upper bound. |
info | the plot rendering info. |
source | the source point. |
Multiplies the range on the range axis/axes by the specified factor.
factor | the zoom factor. |
---|---|
info | the plot rendering info. |
source | the source point. |
Calculates the space required for all the axes in the plot.
g2 | the graphics device. |
---|---|
plotArea | the plot area. |
Calculates the space required for the domain axis/axes.
g2 | the graphics device. |
---|---|
plotArea | the plot area. |
space | a carrier for the result (null permitted). |
Calculates the space required for the range axis/axes.
g2 | the graphics device. |
---|---|
plotArea | the plot area. |
space | a carrier for the result (null permitted). |
A utility method for drawing the axes.
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). |
Draws a domain crosshair.
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. |
Draws the gridlines for the plot, if they are visible.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
ticks | the ticks. |
Draws the domain markers (if any) for an axis and layer. This method is typically called from within the draw() method.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
index | the renderer index. |
layer | the layer (foreground or background). |
Utility method for drawing a horizontal line across the data area of the plot.
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. |
Draws the quadrants.
g2 | the graphics device. |
---|---|
area | the area. |
Draws a range crosshair.
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. |
Draws the gridlines for the plot's primary range axis, if they are visible.
g2 | the graphics device. |
---|---|
area | the data area. |
ticks | the ticks. |
Draws the range markers (if any) for a renderer and layer. This method is typically called from within the draw() method.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
index | the renderer index. |
layer | the layer (foreground or background). |
Utility method for drawing a vertical line on the data area of the plot.
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. |
Draws a base line across the chart at value zero on the domain axis.
g2 | the graphics device. |
---|---|
area | the data area. |
Draws a base line across the chart at value zero on the range axis.
g2 | the graphics device. |
---|---|
area | the data area. |