public class GridPlotter extends Object implements Plotter<GridPlotter.GridStyle>
| Modifier and Type | Class and Description |
|---|---|
static class |
GridPlotter.GridStyle
Style for configuring the grid plot.
|
| Modifier and Type | Field and Description |
|---|---|
static ConfigKey<Combiner> |
COMBINER_KEY
Config key for combination mode.
|
static ReportKey<StarTable> |
GRIDTABLE_KEY
ReportKey for exported grid table.
|
static ConfigKey<Double> |
TRANSPARENCY_KEY |
static ConfigKey<BinSizer> |
XBINSIZER_KEY
Config key for X bin size configuration.
|
static ReportKey<Double> |
XBINWIDTH_KEY
ReportKey for actual X bin extent.
|
static ConfigKey<Double> |
XPHASE_KEY
Config key for X bin phase.
|
static ConfigKey<BinSizer> |
YBINSIZER_KEY
Config key for Y bin size configuration.
|
static ReportKey<Double> |
YBINWIDTH_KEY
ReportKey for actual Y bin extent.
|
static ConfigKey<Double> |
YPHASE_KEY
Config key for Y bin phase.
|
| Constructor and Description |
|---|
GridPlotter(boolean transparent)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
PlotLayer |
createLayer(DataGeom geom,
DataSpec dataSpec,
GridPlotter.GridStyle style)
Creates a PlotLayer based on the given geometry, data and style.
|
GridPlotter.GridStyle |
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(GridPlotter.GridStyle 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.
|
boolean |
hasReports()
Indicates whether the drawings produced by this plotter will
return general interest report information to upstream plotting code.
|
public static final ReportKey<Double> XBINWIDTH_KEY
public static final ReportKey<Double> YBINWIDTH_KEY
public static final ReportKey<StarTable> GRIDTABLE_KEY
public static final ConfigKey<BinSizer> XBINSIZER_KEY
public static final ConfigKey<BinSizer> YBINSIZER_KEY
public GridPlotter(boolean transparent)
transparent - if true, there will be a config option for
setting the alpha value of the whole layerpublic String getPlotterName()
PlottergetPlotterName in interface Plotter<GridPlotter.GridStyle>public Icon getPlotterIcon()
PlottergetPlotterIcon in interface Plotter<GridPlotter.GridStyle>public CoordGroup getCoordGroup()
PlottergetCoordGroup in interface Plotter<GridPlotter.GridStyle>public boolean hasReports()
PlotterhasReports in interface Plotter<GridPlotter.GridStyle>Drawing.getReport(java.lang.Object)public String getPlotterDescription()
PlotterNote: really this should appear at the LayerType level.
getPlotterDescription in interface Plotter<GridPlotter.GridStyle>public ConfigKey<?>[] getStyleKeys()
PlotterPlotter.createStyle(uk.ac.starlink.ttools.plot2.config.ConfigMap) method.getStyleKeys in interface Plotter<GridPlotter.GridStyle>public GridPlotter.GridStyle 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<GridPlotter.GridStyle>config - map of style configuration itemspublic Object getRangeStyleKey(GridPlotter.GridStyle 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<GridPlotter.GridStyle>style - plot style to assesspublic PlotLayer createLayer(DataGeom geom, DataSpec dataSpec, GridPlotter.GridStyle style)
PlotterThe style parameter is the result of a call to
Plotter.createStyle(uk.ac.starlink.ttools.plot2.config.ConfigMap).
The dataSpec parameter must contain the coordinates
defined by this plotter's CoordGroup.
The pointDataGeom
parameter is only used if the
CoordGroup.getBasicPositionCount()
or
CoordGroup.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.
createLayer in interface Plotter<GridPlotter.GridStyle>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 createStyleCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.