uk.ac.starlink.ttools.plot
Class HistogramPlotState

java.lang.Object
  extended by uk.ac.starlink.ttools.plot.PlotState
      extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class uk.ac.starlink.ttools.plot.PlotState
PlotState.SimpleValueInfo
 
Constructor Summary
HistogramPlotState()
           
 
Method Summary
 boolean equals(Object o)
           
 double getBinBase()
          Returns the lower bound for one of the bins.
 double getBinWidth()
          Returns the bin width for the histogram.
 boolean getCumulative()
          Determines whether the histogram is conventional or cumulative.
 boolean getNormalised()
          Determines whether the histogram is normlalised to a total value of unity.
 boolean getWeighted()
          Determines whether non-unit weighting is (maybe) in force for this state.
 int hashCode()
           
 void setBinBase(double base)
          Sets the lower bound for one of the bins.
 void setBinWidth(double width)
          Sets the bin width for the histogram.
 void setCumulative(boolean cumulative)
          Sets whether the histogram should be conventional or cumulative.
 void setNormalised(boolean normalised)
          Sets whether the histogram is to be normalised to a total value of unity.
 void setWeighted(boolean weighted)
          Sets whether non-unit weighting is (maybe) in force for this state.
 
Methods inherited from class uk.ac.starlink.ttools.plot.PlotState
compare, getAntialias, getAxes, getAxisLabels, getConverters, getFlipFlags, getGrid, getLogFlags, getMainNdim, getPlotData, getRanges, getShaders, getValid, setAntialias, setAxes, setAxisLabels, setConverters, setFlipFlags, setGrid, setLogFlags, setMainNdim, setPlotData, setRanges, setShaders, setValid
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistogramPlotState

public HistogramPlotState()
Method Detail

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


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.