Class HistogramPlotStateFactory

java.lang.Object
uk.ac.starlink.ttools.plottask.PlotStateFactory
uk.ac.starlink.ttools.plottask.HistogramPlotStateFactory

public class HistogramPlotStateFactory extends PlotStateFactory
PlotStateFactory for a histogram plot.
Since:
15 Aug 2008
Author:
Mark Taylor
  • Constructor Details

    • HistogramPlotStateFactory

      public HistogramPlotStateFactory()
      Constructor.
  • Method Details

    • getParameters

      public uk.ac.starlink.task.Parameter<?>[] getParameters()
      Description copied from class: PlotStateFactory
      Returns the parameters associated with this object. The returned list is intended for external use in documentation; the parameter objects returned may or may not be those used for obtaining values from a particular execution environment. For this reason they may have names which are symbolic, that is, represent possible parameter names. Since actual parameter names are dynamically determined from other parameter names, it is not possible to return an exhaustive list.
      Overrides:
      getParameters in class PlotStateFactory
      Returns:
      array of parameters to be used for documentation
    • createPlotState

      protected PlotState createPlotState()
      Description copied from class: PlotStateFactory
      Creates a new unconfigured PlotState object suitable for configuration by this factory.
      Overrides:
      createPlotState in class PlotStateFactory
      Returns:
      plot state
    • configurePlotState

      protected void configurePlotState(PlotState pstate, uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
      Description copied from class: PlotStateFactory
      Configures a PlotState object by examining parameter values in a given execution environment. Such an object was presumably previously created by a call to PlotStateFactory.createPlotState().
      Overrides:
      configurePlotState in class PlotStateFactory
      Parameters:
      pstate - plot state to configure
      env - execution environment
      Throws:
      uk.ac.starlink.task.TaskException
    • createPlotData

      protected TablePlotData createPlotData(uk.ac.starlink.task.Environment env, String tLabel, uk.ac.starlink.table.StarTable table, String[] setExprs, String[] setNames, Style[] setStyles, String labelExpr, String[] coordExprs, String[] errExprs) throws uk.ac.starlink.task.TaskException, gnu.jel.CompilationException
      Description copied from class: PlotStateFactory
      Constructs a PlotData object. Called by PlotStateFactory.configurePlotState(uk.ac.starlink.ttools.plot.PlotState, uk.ac.starlink.task.Environment); may be overridden by subclasses.
      Overrides:
      createPlotData in class PlotStateFactory
      Parameters:
      env - execution environment
      tLabel - table identifier suffix
      table - input table
      setExprs - nset-element JEL boolean-valued expression array for set inclusion
      setNames - nset-element set name array
      setStyles - nset-elemnt set style array
      labelExpr - JEL expression for text label
      coordExprs - ndim-element JEL double-valued expression array for coordinate values
      errExprs - nerr-element expression(s) array for error values
      Returns:
      new PlotData object based on parameters
      Throws:
      uk.ac.starlink.task.TaskException
      gnu.jel.CompilationException
    • createStyleFactory

      protected StyleFactory createStyleFactory(String prefix)
      Description copied from class: PlotStateFactory
      Constructs a style factory which can retrieve a plotting style suitable for use with this factory from the environment.
      Overrides:
      createStyleFactory in class PlotStateFactory
      Parameters:
      prefix - prefix to use for all style-type variables
    • requiresConfigureFromBounds

      protected boolean requiresConfigureFromBounds(PlotState state)
      Description copied from class: PlotStateFactory
      Indicates whether it is necessary to calculate the DataBounds for a given PlotState before it is ready to be used. Iff true is returned, then PlotStateFactory.configureFromBounds(uk.ac.starlink.ttools.plot.PlotState, uk.ac.starlink.ttools.plot.DataBounds) will be called later.
      Overrides:
      requiresConfigureFromBounds in class PlotStateFactory
      Parameters:
      state - plot state
      Returns:
      whether configureFromBounds should be called
    • configureFromBounds

      protected void configureFromBounds(PlotState pstate, DataBounds bounds)
      Description copied from class: PlotStateFactory
      Updates a plot state generated by this factory with information generated from a first pass through the data.
      Overrides:
      configureFromBounds in class PlotStateFactory
      Parameters:
      pstate - plot state to update
      bounds - data bounds calculated by a pass through the data