Class ScatterPlot

All Implemented Interfaces:
ImageObserver, MenuContainer, Printable, Serializable

public class ScatterPlot extends SurfacePlot
Component which can display a scatter plot of points.
Since:
17 Jun 2004
Author:
Mark Taylor (Starlink)
See Also:
  • Constructor Details

    • ScatterPlot

      public ScatterPlot(PlotSurface surface)
      Constructs a new scatter plot, specifying the initial plotting surface which provides axis plotting and so on.
      Parameters:
      surface - plotting surface implementation
  • Method Details

    • setState

      public void setState(PlotState state)
      Description copied from class: TablePlot
      Sets the plot state for this plot. This characterises how the plot will be done next time this component is painted.
      Overrides:
      setState in class SurfacePlot
      Parameters:
      state - plot state
    • getPlottedPointIterator

      public PointIterator getPlottedPointIterator()
      Returns an iterator over the points plotted last time this component plotted itself.
      Returns:
      point iterator
    • getPointPlacer

      public PointPlacer getPointPlacer()
      Returns a point placer suitable for this plot.
      Returns:
      point placer
    • transformErrors

      public static boolean transformErrors(Point point, double[] centre, double[][] errors, PlotSurface surface, int[] xoffs, int[] yoffs)
      Transforms error bounds from data space to graphics space. The results are written into supplied X and Y graphics space offset arrays, in the form required by MarkStyle.drawErrors. The return value indicates whether there are any non-empty errors bars to draw.
      Parameters:
      point - central value in graphics space
      centre - central value in data space (2-element array x,y)
      errors - error bar end positions in data space; these must be paired (lo,hi in each dimension) and may be null for no/zero error
      surface - plotting surface
      xoffs - array into which X offset values from the central point in graphics coordinates will be written
      yoffs - array into which Y offset values from the central point in graphics coordinates will be written
      Returns:
      true iff any of the elements of xoffs, yoffs are non-zero