Class HistogramPlotStateFactory
java.lang.Object
uk.ac.starlink.ttools.plottask.PlotStateFactory
uk.ac.starlink.ttools.plottask.HistogramPlotStateFactory
PlotStateFactory for a histogram plot.
- Since:
- 15 Aug 2008
- Author:
- Mark Taylor
-
Field Summary
Fields inherited from class PlotStateFactory
AUX_VARIABLE, SUBSET_VARIABLE, TABLE_VARIABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureFromBounds(PlotState pstate, DataBounds bounds) Updates a plot state generated by this factory with information generated from a first pass through the data.protected voidconfigurePlotState(PlotState pstate, uk.ac.starlink.task.Environment env) Configures a PlotState object by examining parameter values in a given execution environment.protected TablePlotDatacreatePlotData(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) Constructs a PlotData object.protected PlotStateCreates a new unconfigured PlotState object suitable for configuration by this factory.protected StyleFactorycreateStyleFactory(String prefix) Constructs a style factory which can retrieve a plotting style suitable for use with this factory from the environment.uk.ac.starlink.task.Parameter<?>[]Returns the parameters associated with this object.protected booleanIndicates whether it is necessary to calculate the DataBounds for a given PlotState before it is ready to be used.Methods inherited from class PlotStateFactory
adjustFromData, calculateBounds, configureFromData, getPlotState, requiresAdjustFromData
-
Constructor Details
-
HistogramPlotStateFactory
public HistogramPlotStateFactory()Constructor.
-
-
Method Details
-
getParameters
public uk.ac.starlink.task.Parameter<?>[] getParameters()Description copied from class:PlotStateFactoryReturns 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:
getParametersin classPlotStateFactory- Returns:
- array of parameters to be used for documentation
-
createPlotState
Description copied from class:PlotStateFactoryCreates a new unconfigured PlotState object suitable for configuration by this factory.- Overrides:
createPlotStatein classPlotStateFactory- 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:PlotStateFactoryConfigures a PlotState object by examining parameter values in a given execution environment. Such an object was presumably previously created by a call toPlotStateFactory.createPlotState().- Overrides:
configurePlotStatein classPlotStateFactory- Parameters:
pstate- plot state to configureenv- 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:PlotStateFactoryConstructs a PlotData object. Called byPlotStateFactory.configurePlotState(PlotState, Environment); may be overridden by subclasses.- Overrides:
createPlotDatain classPlotStateFactory- Parameters:
env- execution environmenttLabel- table identifier suffixtable- input tablesetExprs- nset-element JEL boolean-valued expression array for set inclusionsetNames- nset-element set name arraysetStyles- nset-elemnt set style arraylabelExpr- JEL expression for text labelcoordExprs- ndim-element JEL double-valued expression array for coordinate valueserrExprs- nerr-element expression(s) array for error values- Returns:
- new PlotData object based on parameters
- Throws:
uk.ac.starlink.task.TaskExceptiongnu.jel.CompilationException
-
createStyleFactory
Description copied from class:PlotStateFactoryConstructs a style factory which can retrieve a plotting style suitable for use with this factory from the environment.- Overrides:
createStyleFactoryin classPlotStateFactory- Parameters:
prefix- prefix to use for all style-type variables
-
requiresConfigureFromBounds
Description copied from class:PlotStateFactoryIndicates whether it is necessary to calculate the DataBounds for a given PlotState before it is ready to be used. Iff true is returned, thenPlotStateFactory.configureFromBounds(PlotState, DataBounds)will be called later.- Overrides:
requiresConfigureFromBoundsin classPlotStateFactory- Parameters:
state- plot state- Returns:
- whether configureFromBounds should be called
-
configureFromBounds
Description copied from class:PlotStateFactoryUpdates a plot state generated by this factory with information generated from a first pass through the data.- Overrides:
configureFromBoundsin classPlotStateFactory- Parameters:
pstate- plot state to updatebounds- data bounds calculated by a pass through the data
-