Class CombineArrayPlotter<S extends CombineArrayPlotter.CombineArrayStyle>
- All Implemented Interfaces:
Plotter<S>
- Direct Known Subclasses:
LineCombineArrayPlotter
,MarkCombineArrayPlotter
This plotter is written to cope with blank values for one or other of the X/Y coordinates; if one is blank, it taken to indicate a sequence of values 0, 1, 2, ..., which is probably reasonable for a plot. At present, it will never be fed null values, since FloatingArrayCoord.X/Y are marked required, but if the input coordinates are changed to be optional at some point, it ought to work with that.
- Since:
- 25 Jan 2022
- Author:
- Mark Taylor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Partial Style implementation for use with this class. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateLayer
(DataGeom geom, DataSpec dataSpec, CombineArrayPlotter.CombineArrayStyle style) Creates a PlotLayer based on the given geometry, data and style.getRangeStyleKey
(S style) The AbstractPlotter implementation returns null.Methods inherited from class uk.ac.starlink.ttools.plot2.layer.AbstractPlotter
getCoordGroup, getPlotterIcon, getPlotterName, hasReports
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface uk.ac.starlink.ttools.plot2.Plotter
createStyle, getPlotterDescription, getStyleKeys
-
Field Details
-
XCOMBINER_KEY
Configuration key for X coordinate combination mode. -
YCOMBINER_KEY
Configuration key for Y coordinate combination mode. -
XS_REPKEY
Report key for combined X array values. -
YS_REPKEY
Report key for combined Y array values.
-
-
Constructor Details
-
CombineArrayPlotter
Constructor.- Parameters:
name
- plotter nameicon
- plotter icon
-
-
Method Details
-
createLayer
public PlotLayer createLayer(DataGeom geom, DataSpec dataSpec, CombineArrayPlotter.CombineArrayStyle style) Description copied from interface:Plotter
Creates a PlotLayer based on the given geometry, data and style.The
style
parameter is the result of a call toPlotter.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 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.
- 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
-
getRangeStyleKey
Description copied from class:AbstractPlotter
The AbstractPlotter implementation returns null.- Specified by:
getRangeStyleKey
in interfacePlotter<S extends CombineArrayPlotter.CombineArrayStyle>
- Overrides:
getRangeStyleKey
in classAbstractPlotter<S extends CombineArrayPlotter.CombineArrayStyle>
- Parameters:
style
- plot style to assess- Returns:
- opaque object with equality semantics, or null if axis range is not a function of style
-