Class Stats1Plotter
- All Implemented Interfaces:
Plotter<Stats1Plotter.StatsStyle>
- Since:
- 30 Sep 2016
- Author:
- Mark Taylor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStyle class associated with this plotter. -
Field Summary
FieldsModifier and TypeFieldDescriptionConfig key for equivalent histogram bar width.Report key for fitted multiplicative constant.Report key for gaussian fit function.Report key for fitted mean.static final ConfigKey<Normalisation> Config key for normalisation.Config key to display a line at the mean value.Report key for fitted standard deviation. -
Constructor Summary
ConstructorsConstructorDescriptionStats1Plotter(FloatingCoord xCoord, boolean hasWeight, ConfigKey<Unit> unitKey) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncreateLayer(DataGeom geom, DataSpec dataSpec, Stats1Plotter.StatsStyle style) Creates a PlotLayer based on the given geometry, data and style.createStyle(ConfigMap config) Creates a style that can be used when creating a plot layer.Returns an object describing which data coordinates are used for this plotter and how they are arranged in supplied DataSpec objects.Returns an XML description of this plotter.Returns an icon for this plotter for use in user interface.Returns the name of this plotter for use in user interface.Returns an opaque object characterising the region of the plot surface covered when using a given plotter style.ConfigKey<?>[]Returns the configuration keys used to configure style for this plotter.booleanIndicates whether the drawings produced by this plotter will return general interest report information to upstream plotting code.
-
Field Details
-
CONST_KEY
Report key for fitted multiplicative constant. -
MEAN_KEY
Report key for fitted mean. -
STDEV_KEY
Report key for fitted standard deviation. -
FUNCTION_KEY
Report key for gaussian fit function. -
BINSIZER_KEY
Config key for equivalent histogram bar width. -
NORMALISE_KEY
Config key for normalisation. -
SHOWMEAN_KEY
Config key to display a line at the mean value.
-
-
Constructor Details
-
Stats1Plotter
Constructor.- Parameters:
xCoord- X axis coordinatehasWeight- true if weights may be usedunitKey- config key to select X axis physical units, or null if no unit selection required
-
-
Method Details
-
getPlotterName
Description copied from interface:PlotterReturns the name of this plotter for use in user interface.- Specified by:
getPlotterNamein interfacePlotter<Stats1Plotter.StatsStyle>- Returns:
- user-directed plotter name
-
getPlotterIcon
Description copied from interface:PlotterReturns an icon for this plotter for use in user interface.- Specified by:
getPlotterIconin interfacePlotter<Stats1Plotter.StatsStyle>- Returns:
- plotter icon
-
hasReports
public boolean hasReports()Description copied from interface:PlotterIndicates whether the drawings produced by this plotter will return general interest report information to upstream plotting code.- Specified by:
hasReportsin interfacePlotter<Stats1Plotter.StatsStyle>- Returns:
- true if the plot report may return interesting information
- See Also:
-
getPlotterDescription
Description copied from interface:PlotterReturns an XML description of this plotter.Note: really this should appear at the LayerType level.
- Specified by:
getPlotterDescriptionin interfacePlotter<Stats1Plotter.StatsStyle>- Returns:
- one or more <p> elements
-
getCoordGroup
Description copied from interface:PlotterReturns an object describing which data coordinates are used for this plotter and how they are arranged in supplied DataSpec objects.- Specified by:
getCoordGroupin interfacePlotter<Stats1Plotter.StatsStyle>- Returns:
- coordinate group
-
getStyleKeys
Description copied from interface:PlotterReturns the configuration keys used to configure style for this plotter. The keys in the return value are used in the map supplied to thePlotter.createStyle(uk.ac.starlink.ttools.plot2.config.ConfigMap)method.- Specified by:
getStyleKeysin interfacePlotter<Stats1Plotter.StatsStyle>- Returns:
- keys used when creating a style for this plotter.
-
createStyle
Description copied from interface:PlotterCreates a style that can be used when creating a plot layer. The keys that are significant in the supplied config map are those returned byPlotter.getStyleKeys(). The return value can be used as input toPlotter.createLayer(uk.ac.starlink.ttools.plot2.DataGeom, uk.ac.starlink.ttools.plot2.data.DataSpec, S).- Specified by:
createStylein interfacePlotter<Stats1Plotter.StatsStyle>- Parameters:
config- map of style configuration items- Returns:
- plotter-specific plot style
-
getRangeStyleKey
Description copied from interface:PlotterReturns an opaque object characterising the region of the plot surface covered when using a given plotter style. If this object changes between layers produced by this plotter, it provides a hint that it may be necessary to redetermine the axis ranges (usingextendCoordinateRanges).In many cases, such as scatter-plot-like plotters, the range is determined only by the coordinate data (managed by
DataSpecinputs) so a null value may be returned. This method is chiefly required by histogram-like plotters for which the region on the plot surface is not the union of the input positions.- Specified by:
getRangeStyleKeyin interfacePlotter<Stats1Plotter.StatsStyle>- Parameters:
style- plot style to assess- Returns:
- opaque object with equality semantics, or null if axis range is not a function of style
-
createLayer
Description copied from interface:PlotterCreates a PlotLayer based on the given geometry, data and style.The
styleparameter is the result of a call toPlotter.createStyle(uk.ac.starlink.ttools.plot2.config.ConfigMap).The
dataSpecparameter must contain the coordinates defined by this plotter's CoordGroup.The
pointDataGeomparameter is only used if theCoordGroup.getBasicPositionCount()orCoordGroup.getExtraPositionCount()method from this plotter's CoordGroup return a non-zero value, otherwise the plot does not have point positions.It is legal to supply null for any of the parameters; if insufficient data is supplied to generate a plot, then the method should return null.
Creating a layer should be cheap; layers may be created and not used.
- Specified by:
createLayerin interfacePlotter<Stats1Plotter.StatsStyle>- Parameters:
geom- indicates base position coordinates and their mapping to points in the data spacedataSpec- specifies the data required for the plotstyle- data style as obtained fromcreateStyle- Returns:
- new plot layer, or null if no drawing will take place
-