Class ScatterXYZRenderer

All Implemented Interfaces:
Serializable, ChartElement, Renderer3D, XYZRenderer

A renderer for 3D scatter plots. This renderer is used with an XYZPlot and any XYZDataset instance. Here is a sample:
ScatterPlot3DDemo2.svg
(refer to ScatterPlot3DDemo2.java for the code to generate the above chart).

TIP: to create a chart using this renderer, you can use the Chart3DFactory.createScatterChart(String, String, XYZDataset, String, String, String) method.

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

    • ScatterXYZRenderer

      Creates a new instance with default attribute values.
  • Method Details

    • getSize

      public double getSize()
      Returns the size of the cubes (in world units) used to display each data item. The default value is 0.10.
      Returns:
      The size (in world units).
    • setSize

      public void setSize(double size)
      Sets the size (in world units) of the cubes used to represent each data item and sends a Renderer3DChangeEvent to all registered listeners.
      Parameters:
      size - the size (in world units, must be positive).
    • getItemLabelOffsetPercent

      Returns the item label offsets.
      Returns:
      The item label offsets (never null).
      Since:
      1.3
    • setItemLabelOffsetPercent

      public void setItemLabelOffsetPercent(Offset3D offset)
      Sets the item label offsets and sends a change event to all registered listeners.
      Parameters:
      offset - the new offset (null not permitted).
      Since:
      1.3
    • composeItem

      public void composeItem(XYZDataset dataset, int series, int item, World world, Dimension3D dimensions, double xOffset, double yOffset, double zOffset)
      Constructs and places one item from the specified dataset into the given world. The XYZPlot class will iterate over its dataset and and call this method for each item (in other words, you don't need to call this method directly).
      Specified by:
      composeItem in interface XYZRenderer
      Parameters:
      dataset - the dataset (null not permitted).
      series - the series index.
      item - the item index.
      world - the world (null not permitted).
      dimensions - the dimensions (null not permitted).
      xOffset - the x-offset.
      yOffset - the y-offset.
      zOffset - the z-offset.
    • equals

      public boolean equals(Object obj)
      Tests this renderer for equality with an arbitrary object.
      Overrides:
      equals in class AbstractXYZRenderer
      Parameters:
      obj - the object to test (null permitted).
      Returns:
      A boolean.