Class XYZPlot

All Implemented Interfaces:
Serializable, EventListener, Axis3DChangeListener, ChartElement, Dataset3DChangeListener, Plot3D, Renderer3DChangeListener

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:
  • Constructor Details

    • 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 Details

    • 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

      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

      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

      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

      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

      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

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

      public void setGridlinePaintX(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

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

      public void setGridlineStrokeX(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

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

      public void setGridlinePaintY(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

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

      public void setGridlineStrokeY(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

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

      public void setGridlinePaintZ(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

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

      public void setGridlineStrokeZ(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

      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

      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

      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(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

      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.