Class HistogramPlotState

java.lang.Object
uk.ac.starlink.ttools.plot.PlotState
uk.ac.starlink.ttools.plot.HistogramPlotState

public class HistogramPlotState extends PlotState
Specialisation of PlotState for use with histograms.
Since:
18 Nov 2005
Author:
Mark Taylor
  • Constructor Details

    • HistogramPlotState

      public HistogramPlotState()
  • Method Details

    • setBinWidth

      public void setBinWidth(double width)
      Sets the bin width for the histogram. In the case of a linear X axis this is an additive value (>0), and in the case of a logarithmic X axis it is a multiplicative one (>1).
      Parameters:
      width - new bin width
    • getBinWidth

      public double getBinWidth()
      Returns the bin width for the histogram. In the case of a linear X axis this is an additive value (>0), and in the case of a logarithmic X axis it is a multiplicative one (>1).
      Returns:
      bin width
    • setBinBase

      public void setBinBase(double base)
      Sets the lower bound for one of the bins. This determines bin phase.
      Parameters:
      base - new bin base
    • getBinBase

      public double getBinBase()
      Returns the lower bound for one of the bins. This determines bin phase.
      Returns:
      bin base
    • setCumulative

      public void setCumulative(boolean cumulative)
      Sets whether the histogram should be conventional or cumulative.
      Parameters:
      cumulative - true iff you want a cumulative plot
    • getCumulative

      public boolean getCumulative()
      Determines whether the histogram is conventional or cumulative.
      Returns:
      true iff the plot will be cumulative
    • setWeighted

      public void setWeighted(boolean weighted)
      Sets whether non-unit weighting is (maybe) in force for this state.
      Parameters:
      weighted - whether weights are used
    • getWeighted

      public boolean getWeighted()
      Determines whether non-unit weighting is (maybe) in force for this state.
      Returns:
      whether weights are used
    • setNormalised

      public void setNormalised(boolean normalised)
      Sets whether the histogram is to be normalised to a total value of unity.
      Parameters:
      normalised - whether to normalise histogram
    • getNormalised

      public boolean getNormalised()
      Determines whether the histogram is normlalised to a total value of unity.
      Returns:
      whether normalisation is in force
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class PlotState
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class PlotState