Class Histogram

All Implemented Interfaces:
ImageObserver, MenuContainer, Printable, Serializable

public class Histogram extends SurfacePlot
Component which draws a histogram.
Since:
11 Nov 2005
Author:
Mark Taylor
See Also:
  • Constructor Details

    • Histogram

      public Histogram(PlotSurface surface)
      Constructs a new Histogram.
      Parameters:
      surface - the surface on which plotting will take place
  • 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
    • getBinnedData

      public BinnedData getBinnedData()
      Lazily populate a BinnedData object describing the bins.
      Returns:
      binned data
    • calculateBounds

      public DataBounds calculateBounds(PlotData data, PlotState state)
      Description copied from class: TablePlot
      Calculates data bounds for a given data set as appropriate for this plot.
      Overrides:
      calculateBounds in class TablePlot
      Parameters:
      data - plot data
      state - plot state
      Returns:
      data bounds object
    • getVisiblePoints

      public BitSet getVisiblePoints()
      Returns a bit vector describing which of the points in the Points object most recently plotted by this histogram are covered by the currently visible data range.
      Returns:
      bit set indexing Points
    • getYInfo

      public static uk.ac.starlink.table.ValueInfo getYInfo(boolean isWeighted, boolean isNormalised)
      Returns a metadata object describing the values on the vertical axis.
      Parameters:
      isWeighted - whether the histogram uses weighted counts
      isNormalised - whether the histogram values are normalised to 1
      Returns:
      metadata object