Plotter<HistogramPlotter.HistoStyle>
public class HistogramPlotter extends java.lang.Object implements Plotter<HistogramPlotter.HistoStyle>
Modifier and Type | Class | Description |
---|---|---|
static class |
HistogramPlotter.HistoStyle |
Style subclass for histogram plots.
|
Modifier and Type | Field | Description |
---|---|---|
static ReportKey<BinBag> |
BINS_KEY |
ReportKey for histogram bins.
|
static ConfigKey<BinSizer> |
BINSIZER_KEY |
Config key for bin size configuration.
|
static ReportKey<java.lang.Double> |
BINWIDTH_KEY |
ReportKey for actual bin width.
|
static ConfigKey<java.lang.Double> |
PHASE_KEY |
Config key for bar phase.
|
static ConfigKey<java.lang.Integer> |
THICK_KEY |
Config key for bar line thickness.
|
Constructor | Description |
---|---|
HistogramPlotter(FloatingCoord xCoord,
boolean hasWeight,
ConfigKey<Normalisation> normKey) |
Constructor.
|
Modifier and Type | Method | 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.
|
java.lang.String |
getPlotterDescription() |
Returns an XML description of this plotter.
|
javax.swing.Icon |
getPlotterIcon() |
Returns an icon for this plotter for use in user interface.
|
java.lang.String |
getPlotterName() |
Returns the name of this plotter for use in user interface.
|
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<java.lang.Double> BINWIDTH_KEY
public static final ConfigKey<BinSizer> BINSIZER_KEY
public static final ConfigKey<java.lang.Integer> THICK_KEY
public static final ConfigKey<java.lang.Double> PHASE_KEY
public HistogramPlotter(FloatingCoord xCoord, boolean hasWeight, ConfigKey<Normalisation> normKey)
xCoord
- X axis coordinatehasWeight
- true to permit histogram weightingnormKey
- config key for normalisation optionspublic java.lang.String getPlotterName()
Plotter
getPlotterName
in interface Plotter<HistogramPlotter.HistoStyle>
public javax.swing.Icon getPlotterIcon()
Plotter
getPlotterIcon
in interface Plotter<HistogramPlotter.HistoStyle>
public java.lang.String getPlotterDescription()
Plotter
Note: really this should appear at the LayerType level.
getPlotterDescription
in interface Plotter<HistogramPlotter.HistoStyle>
public CoordGroup getCoordGroup()
Plotter
getCoordGroup
in interface Plotter<HistogramPlotter.HistoStyle>
public ConfigKey[] getStyleKeys()
Plotter
Plotter.createStyle(uk.ac.starlink.ttools.plot2.config.ConfigMap)
method.getStyleKeys
in interface Plotter<HistogramPlotter.HistoStyle>
public HistogramPlotter.HistoStyle createStyle(ConfigMap config)
Plotter
Plotter.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 boolean hasReports()
Plotter
hasReports
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 space;
if non-null, the data geom's
DataGeom.hasPosition()
method will return truedataSpec
- specifies the data required for the plotstyle
- data style as obtained from createStyle
public int getWeightCoordIndex()
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.