com.orsoncharts.plot

## Class XYZPlot

- java.lang.Object
- - com.orsoncharts.plot.AbstractPlot3D
  - - com.orsoncharts.plot.XYZPlot

- All Implemented Interfaces:
    Axis3DChangeListener, ChartElement, Dataset3DChangeListener, Plot3D, Renderer3DChangeListener, java.io.Serializable, java.util.EventListener

      public class XYZPlot
      extends AbstractPlot3D
      implements Dataset3DChangeListener, Axis3DChangeListener, Renderer3DChangeListener, java.io.Serializable

  A 3D plot with three numerical axes that displays data from an `XYZDataset`.
  NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.orsoncharts.plot.AbstractPlot3D

      `autoAdjustDimensions, dimensions`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XYZPlot(XYZDataset dataset, XYZRenderer renderer, ValueAxis3D xAxis, ValueAxis3D yAxis, ValueAxis3D zAxis)` Creates a new plot with the specified axes.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `axisChanged(Axis3DChangeEvent event)` Receives notification that one of the plot's axes has changed, and responds by passing on a `Plot3DChangeEvent` to the plot's registered listeners (with the default set-up, this notifies the chart).
    `void` | `compose(World world, double xOffset, double yOffset, double zOffset)` Adds 3D objects representing the current data for the plot to the specified world.
    `void` | `datasetChanged(Dataset3DChangeEvent event)` Receives notification that the plot's dataset has changed, and responds by passing on a `Plot3DChangeEvent` to the plot's registered listeners (with the default set-up, this notifies the chart).
    `boolean` | `equals(java.lang.Object obj)` Tests this plot instance for equality with an arbitrary object.
    `java.lang.String` | `generateToolTipText(ItemKey itemKey)` Returns the tool tip text for the specified data item, or `null` if no tool tip is required.
    `XYZDataset` | `getDataset()` Returns the dataset for the plot.
    `java.awt.Paint` | `getGridlinePaintX()` Returns the paint used to draw the gridlines for the x-axis.
    `java.awt.Paint` | `getGridlinePaintY()` Returns the paint used to draw the gridlines for the y-axis.
    `java.awt.Paint` | `getGridlinePaintZ()` Returns the paint used to draw the gridlines for the z-axis.
    `java.awt.Stroke` | `getGridlineStrokeX()` Returns the stroke used to draw the gridlines for the x-axis.
    `java.awt.Stroke` | `getGridlineStrokeY()` Returns the stroke used to draw the gridlines for the y-axis.
    `java.awt.Stroke` | `getGridlineStrokeZ()` Returns the stroke used to draw the gridlines for the z-axis.
    `java.util.List<LegendItemInfo>` | `getLegendInfo()` Returns a list containing legend item info, typically one item for each series in the chart.
    `XYZLabelGenerator` | `getLegendLabelGenerator()` Returns the legend label generator.
    `XYZRenderer` | `getRenderer()` Returns the renderer for the plot.
    `ValueAxis3D` | `getXAxis()` Returns the x-axis.
    `ValueAxis3D` | `getYAxis()` Returns the y-axis.
    `ValueAxis3D` | `getZAxis()` Returns the z-axis.
    `boolean` | `isGridlinesVisibleX()` Returns the flag that controls whether or not gridlines are shown for the x-axis.
    `boolean` | `isGridlinesVisibleY()` Returns the flag that controls whether or not gridlines are shown for the y-axis.
    `boolean` | `isGridlinesVisibleZ()` Returns the flag that controls whether or not gridlines are shown for the z-axis.
    `void` | `receive(ChartElementVisitor visitor)` Receives a visitor.
    `void` | `rendererChanged(Renderer3DChangeEvent event)` Receives notification that the plot's renderer has changed, and responds by passing on a `Plot3DChangeEvent` to the plot's registered listeners (with the default set-up, this notifies the chart).
    `void` | `setDataset(XYZDataset dataset)` Sets the dataset and sends a change event notification to all registered listeners.
    `void` | `setDimensions(Dimension3D dim)` Sets the dimensions for the plot and notifies registered listeners that the plot dimensions have been changed.
    `void` | `setGridlinePaintX(java.awt.Paint paint)` Sets the paint used to draw the gridlines for the x-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setGridlinePaintY(java.awt.Paint paint)` Sets the paint used to draw the gridlines for the y-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setGridlinePaintZ(java.awt.Paint paint)` Sets the paint used to draw the gridlines for the z-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setGridlineStrokeX(java.awt.Stroke stroke)` Sets the stroke used to draw the gridlines for the x-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setGridlineStrokeY(java.awt.Stroke stroke)` Sets the stroke used to draw the gridlines for the y-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setGridlineStrokeZ(java.awt.Stroke stroke)` Sets the stroke used to draw the gridlines for the z-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setGridlinesVisibleX(boolean visible)` Sets the flag that controls whether or not gridlines are shown for the x-axis and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setGridlinesVisibleY(boolean visible)` Sets the flag that controls whether or not gridlines are shown for the y-axis and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setGridlinesVisibleZ(boolean visible)` Sets the flag that controls whether or not gridlines are shown for the z-axis and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setLegendLabelGenerator(XYZLabelGenerator generator)` Sets the legend label generator and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setRenderer(XYZRenderer renderer)` Sets the renderer for the plot and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setXAxis(ValueAxis3D xAxis)` Sets the x-axis and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setYAxis(ValueAxis3D yAxis)` Sets the y-axis and sends a `Plot3DChangeEvent` to all registered listeners.
    `void` | `setZAxis(ValueAxis3D zAxis)` Sets the z-axis and sends a `Plot3DChangeEvent` to all registered listeners.

    - ### Methods inherited from class com.orsoncharts.plot.AbstractPlot3D

      `addChangeListener, fireChangeEvent, getChart, getDimensions, isAutoAdjustDimensions, isNotify, notifyListeners, removeChangeListener, setChart, setNotify`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XYZPlot

          public XYZPlot(XYZDataset dataset,
                         XYZRenderer renderer,
                         ValueAxis3D xAxis,
                         ValueAxis3D yAxis,
                         ValueAxis3D zAxis)

      Creates a new plot with the specified axes.
      Parameters:
        `dataset` - the dataset (`null` not permitted).
        `renderer` - the renderer (`null` not permitted).
        `xAxis` - the x-axis (`null` not permitted).
        `yAxis` - the y-axis (`null` not permitted).
        `zAxis` - the z-axis (`null` not permitted).

  - ### Method Detail

    - #### setDimensions

          public void setDimensions(Dimension3D dim)

      Sets the dimensions for the plot and notifies registered listeners that the plot dimensions have been changed.
      Parameters:
        `dim` - the new dimensions (`null` not permitted).

    - #### getDataset

          public XYZDataset getDataset()

      Returns the dataset for the plot.
      Returns:
        The dataset (never `null`).

    - #### setDataset

          public void setDataset(XYZDataset dataset)

      Sets the dataset and sends a change event notification to all registered listeners.
      Parameters:
        `dataset` - the new dataset (`null` not permitted).

    - #### getXAxis

          public ValueAxis3D getXAxis()

      Returns the x-axis.
      Returns:
        The x-axis (never `null`).

    - #### setXAxis

          public void setXAxis(ValueAxis3D xAxis)

      Sets the x-axis and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `xAxis` - the x-axis (`null` not permitted).

    - #### getYAxis

          public ValueAxis3D getYAxis()

      Returns the y-axis.
      Returns:
        The y-axis (never `null`).

    - #### setYAxis

          public void setYAxis(ValueAxis3D yAxis)

      Sets the y-axis and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `yAxis` - the y-axis (`null` not permitted).

    - #### getZAxis

          public ValueAxis3D getZAxis()

      Returns the z-axis.
      Returns:
        The z-axis (never `null`).

    - #### setZAxis

          public void setZAxis(ValueAxis3D zAxis)

      Sets the z-axis and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `zAxis` - the z-axis (`null` not permitted).

    - #### getRenderer

          public XYZRenderer getRenderer()

      Returns the renderer for the plot.
      Returns:
        The renderer (possibly `null`).

    - #### setRenderer

          public void setRenderer(XYZRenderer renderer)

      Sets the renderer for the plot and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `renderer` - the renderer (`null` not permitted).

    - #### isGridlinesVisibleX

          public boolean isGridlinesVisibleX()

      Returns the flag that controls whether or not gridlines are shown for the x-axis.
      Returns:
        A boolean.

    - #### setGridlinesVisibleX

          public void setGridlinesVisibleX(boolean visible)

      Sets the flag that controls whether or not gridlines are shown for the x-axis and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `visible` - the new flag value.

    - #### getGridlinePaintX

          public java.awt.Paint getGridlinePaintX()

      Returns the paint used to draw the gridlines for the x-axis.
      Returns:
        The paint (`null` not permitted).

    - #### setGridlinePaintX

          public void setGridlinePaintX(java.awt.Paint paint)

      Sets the paint used to draw the gridlines for the x-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `paint` - the paint (`null` not permitted).

    - #### getGridlineStrokeX

          public java.awt.Stroke getGridlineStrokeX()

      Returns the stroke used to draw the gridlines for the x-axis.
      Returns:
        The stroke (`null` not permitted).

    - #### setGridlineStrokeX

          public void setGridlineStrokeX(java.awt.Stroke stroke)

      Sets the stroke used to draw the gridlines for the x-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `stroke` - the stroke (`null` not permitted).

    - #### isGridlinesVisibleY

          public boolean isGridlinesVisibleY()

      Returns the flag that controls whether or not gridlines are shown for the y-axis.
      Returns:
        A boolean.

    - #### setGridlinesVisibleY

          public void setGridlinesVisibleY(boolean visible)

      Sets the flag that controls whether or not gridlines are shown for the y-axis and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `visible` - the new flag value.

    - #### getGridlinePaintY

          public java.awt.Paint getGridlinePaintY()

      Returns the paint used to draw the gridlines for the y-axis.
      Returns:
        The paint (`null` not permitted).

    - #### setGridlinePaintY

          public void setGridlinePaintY(java.awt.Paint paint)

      Sets the paint used to draw the gridlines for the y-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `paint` - the paint (`null` not permitted).

    - #### getGridlineStrokeY

          public java.awt.Stroke getGridlineStrokeY()

      Returns the stroke used to draw the gridlines for the y-axis.
      Returns:
        The stroke (`null` not permitted).

    - #### setGridlineStrokeY

          public void setGridlineStrokeY(java.awt.Stroke stroke)

      Sets the stroke used to draw the gridlines for the y-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `stroke` - the stroke (`null` not permitted).

    - #### isGridlinesVisibleZ

          public boolean isGridlinesVisibleZ()

      Returns the flag that controls whether or not gridlines are shown for the z-axis.
      Returns:
        A boolean.

    - #### setGridlinesVisibleZ

          public void setGridlinesVisibleZ(boolean visible)

      Sets the flag that controls whether or not gridlines are shown for the z-axis and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `visible` - the new flag value.

    - #### getGridlinePaintZ

          public java.awt.Paint getGridlinePaintZ()

      Returns the paint used to draw the gridlines for the z-axis.
      Returns:
        The paint (`null` not permitted).

    - #### setGridlinePaintZ

          public void setGridlinePaintZ(java.awt.Paint paint)

      Sets the paint used to draw the gridlines for the z-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `paint` - the paint (`null` not permitted).

    - #### getGridlineStrokeZ

          public java.awt.Stroke getGridlineStrokeZ()

      Returns the stroke used to draw the gridlines for the z-axis.
      Returns:
        The stroke (`null` not permitted).

    - #### setGridlineStrokeZ

          public void setGridlineStrokeZ(java.awt.Stroke stroke)

      Sets the stroke used to draw the gridlines for the z-axis, and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `stroke` - the stroke (`null` not permitted).

    - #### getLegendLabelGenerator

          public XYZLabelGenerator getLegendLabelGenerator()

      Returns the legend label generator. The default value is a default instance of `StandardXYZLabelGenerator`.
      Returns:
        The legend label generator (never `null`).
      Since:
        1.2

    - #### setLegendLabelGenerator

          public void setLegendLabelGenerator(XYZLabelGenerator generator)

      Sets the legend label generator and sends a `Plot3DChangeEvent` to all registered listeners.
      Parameters:
        `generator` - the generator (`null` not permitted).
      Since:
        1.2

    - #### getLegendInfo

          public java.util.List<LegendItemInfo> getLegendInfo()

      Returns a list containing legend item info, typically one item for each series in the chart. This is intended for use in the construction of a chart legend.
      Specified by:
        `getLegendInfo` in interface `Plot3D`
      Returns:
        A list containing legend item info.

    - #### compose

          public void compose(World world,
                              double xOffset,
                              double yOffset,
                              double zOffset)

      Adds 3D objects representing the current data for the plot to the specified world. After the world has been populated (or constructed) in this way, it is ready for rendering.
      Specified by:
        `compose` in interface `Plot3D`
      Parameters:
        `world` - the world (`null` not permitted).
        `xOffset` - the x-offset.
        `yOffset` - the y-offset.
        `zOffset` - the z-offset.

    - #### generateToolTipText

          public java.lang.String generateToolTipText(ItemKey itemKey)

      Description copied from class: `AbstractPlot3D`
      Returns the tool tip text for the specified data item, or `null` if no tool tip is required.
      Specified by:
        `generateToolTipText` in interface `Plot3D`
      Specified by:
        `generateToolTipText` in class `AbstractPlot3D`
      Parameters:
        `itemKey` - the item key (`null` not permitted).
      Returns:
        The tool tip text (possibly `null`).

    - #### receive

          public void receive(ChartElementVisitor visitor)

      Receives a visitor. This is a general purpose mechanism, but the main use is to apply chart style changes across all the elements of a chart.
      Specified by:
        `receive` in interface `ChartElement`
      Specified by:
        `receive` in class `AbstractPlot3D`
      Parameters:
        `visitor` - the visitor (`null` not permitted).
      Since:
        1.2

    - #### equals

          public boolean equals(java.lang.Object obj)

      Tests this plot instance for equality with an arbitrary object.
      Overrides:
        `equals` in class `AbstractPlot3D`
      Parameters:
        `obj` - the object (`null` permitted).
      Returns:
        A boolean.

    - #### axisChanged

          public void axisChanged(Axis3DChangeEvent event)

      Receives notification that one of the plot's axes has changed, and responds by passing on a `Plot3DChangeEvent` to the plot's registered listeners (with the default set-up, this notifies the chart).
      Specified by:
        `axisChanged` in interface `Axis3DChangeListener`
      Parameters:
        `event` - the event.

    - #### rendererChanged

          public void rendererChanged(Renderer3DChangeEvent event)

      Receives notification that the plot's renderer has changed, and responds by passing on a `Plot3DChangeEvent` to the plot's registered listeners (with the default set-up, this notifies the chart).
      Specified by:
        `rendererChanged` in interface `Renderer3DChangeListener`
      Parameters:
        `event` - the event.

    - #### datasetChanged

          public void datasetChanged(Dataset3DChangeEvent event)

      Receives notification that the plot's dataset has changed, and responds by passing on a `Plot3DChangeEvent` to the plot's registered listeners (with the default set-up, this notifies the chart).
      Specified by:
        `datasetChanged` in interface `Dataset3DChangeListener`
      Overrides:
        `datasetChanged` in class `AbstractPlot3D`
      Parameters:
        `event` - the event.