public class HistogramPlotter extends Object implements Plotter<HistogramPlotter.HistoStyle>
| Modifier and Type | Class and Description |
|---|---|
static class |
HistogramPlotter.HistoStyle
Style subclass for histogram plots.
|
| Modifier and Type | Field and Description |
|---|---|
static ReportKey<BinBag> |
BINS_KEY
ReportKey for histogram bins.
|
static ConfigKey<BinSizer> |
BINSIZER_KEY
Config key for bin size configuration.
|
static ReportKey<StarTable> |
BINTABLE_KEY
ReportKey for tabular result of plot.
|
static ReportKey<Double> |
BINWIDTH_KEY
ReportKey for actual bin width.
|
static ConfigKey<Double> |
PHASE_KEY
Config key for bar phase.
|
static ConfigKey<Integer> |
THICK_KEY
Config key for bar line thickness.
|
| Constructor and Description |
|---|
HistogramPlotter(FloatingCoord xCoord,
boolean hasWeight,
PerUnitConfigKey<Unit> unitKey)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
PlotLayer |
createLayer(DataGeom geom,
DataSpec dataSpec,
HistogramPlotter.HistoStyle style)
The supplied
geom is ignored. |
HistogramPlotter.HistoStyle |
createStyle(ConfigMap config)
Creates a style that can be used when creating a plot layer.
|
CoordGroup |
getCoordGroup()
Returns an object describing which data coordinates are used for
this plotter and how they are arranged in supplied DataSpec objects.
|
String |
getPlotterDescription()
Returns an XML description of this plotter.
|
Icon |
getPlotterIcon()
Returns an icon for this plotter for use in user interface.
|
String |
getPlotterName()
Returns the name of this plotter for use in user interface.
|
Object |
getRangeStyleKey(HistogramPlotter.HistoStyle style)
Returns an opaque object characterising the region of the plot surface
covered when using a given plotter style.
|
ConfigKey<?>[] |
getStyleKeys()
Returns the configuration keys used to configure style for this plotter.
|
int |
getWeightCoordIndex()
Returns the DataSpec coord index used for the weighting data
for this plotter.
|
boolean |
hasReports()
Indicates whether the drawings produced by this plotter will
return general interest report information to upstream plotting code.
|
public static final ReportKey<StarTable> BINTABLE_KEY
public static final ConfigKey<BinSizer> BINSIZER_KEY
public HistogramPlotter(FloatingCoord xCoord, boolean hasWeight, PerUnitConfigKey<Unit> unitKey)
xCoord - X axis coordinatehasWeight - true to permit histogram weightingunitKey - config key to select X axis physical units,
or null if no unit selection requiredpublic String getPlotterName()
PlottergetPlotterName in interface Plotter<HistogramPlotter.HistoStyle>public Icon getPlotterIcon()
PlottergetPlotterIcon in interface Plotter<HistogramPlotter.HistoStyle>public String getPlotterDescription()
PlotterNote: really this should appear at the LayerType level.
getPlotterDescription in interface Plotter<HistogramPlotter.HistoStyle>public CoordGroup getCoordGroup()
PlottergetCoordGroup in interface Plotter<HistogramPlotter.HistoStyle>public ConfigKey<?>[] getStyleKeys()
PlotterPlotter.createStyle(uk.ac.starlink.ttools.plot2.config.ConfigMap) method.getStyleKeys in interface Plotter<HistogramPlotter.HistoStyle>public HistogramPlotter.HistoStyle createStyle(ConfigMap config)
PlotterPlotter.getStyleKeys().
The return value can be used as input to Plotter.createLayer(uk.ac.starlink.ttools.plot2.DataGeom, uk.ac.starlink.ttools.plot2.data.DataSpec, S).createStyle in interface Plotter<HistogramPlotter.HistoStyle>config - map of style configuration itemspublic Object getRangeStyleKey(HistogramPlotter.HistoStyle style)
PlotterextendCoordinateRanges).
In many cases, such as scatter-plot-like plotters, the range
is determined only by the coordinate data
(managed by DataSpec inputs)
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.
getRangeStyleKey in interface Plotter<HistogramPlotter.HistoStyle>style - plot style to assesspublic boolean hasReports()
PlotterhasReports in interface Plotter<HistogramPlotter.HistoStyle>Drawing.getReport(java.lang.Object)public PlotLayer createLayer(DataGeom geom, DataSpec dataSpec, HistogramPlotter.HistoStyle style)
geom is ignored.createLayer in interface Plotter<HistogramPlotter.HistoStyle>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 from createStylepublic int getWeightCoordIndex()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.