public class DensogramPlotter extends Pixel1dPlotter<DensogramPlotter.DensoStyle>
Modifier and Type | Class and Description |
---|---|
static class |
DensogramPlotter.DensoStyle
Plotting style for this class.
|
Pixel1dPlotter.BinArray, Pixel1dPlotter.Pixel1dPlan
Modifier and Type | Field and Description |
---|---|
static ConfigKey<Integer> |
EXTENT_KEY
Config key for the height of the density bar.
|
static ConfigKey<Double> |
POSITION_KEY
Config key for the position of the density bar.
|
static RampKeySet |
RAMP_KEYSET
Config keyset for the colour ramp.
|
KERNEL_KEY, SMOOTHSIZER_KEY, SMOOTHWIDTH_KEY
Constructor and Description |
---|
DensogramPlotter(FloatingCoord xCoord,
boolean hasWeight)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DensogramPlotter.DensoStyle |
createStyle(ConfigMap config)
Creates a style that can be used when creating a plot layer.
|
protected void |
extendPixel1dCoordinateRanges(Range[] ranges,
boolean[] logFlags,
DensogramPlotter.DensoStyle style,
DataSpec dataSpec,
DataStore dataStore)
Performs any required range extension.
|
protected Combiner |
getCombiner(DensogramPlotter.DensoStyle style)
Returns the bin aggregation mode implied by a given style.
|
protected LayerOpt |
getLayerOpt(DensogramPlotter.DensoStyle style)
Returns the LayerOpt suitable for a given style for this plotter.
|
protected ReportMap |
getPixel1dReport(Pixel1dPlotter.Pixel1dPlan plan,
DensogramPlotter.DensoStyle style,
boolean xLog)
Returns information associated with the plot.
|
protected int |
getPixelPadding(DensogramPlotter.DensoStyle style,
PlanarSurface surf)
Returns the padding required at both ends of the array of
pixel bins for calculations.
|
String |
getPlotterDescription()
Returns an XML description of this plotter.
|
Object |
getRangeStyleKey(DensogramPlotter.DensoStyle 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.
|
protected boolean |
isY(DensogramPlotter.DensoStyle style)
Returns the sideways flag implied by a given style.
|
protected void |
paintBins(PlanarSurface surface,
Pixel1dPlotter.BinArray binArray,
DensogramPlotter.DensoStyle style,
Graphics2D g)
Draws the graphical representation of a given array of counts per
horizontal pixel.
|
createKernel, createLayer, getCombinerKey, getCoordGroup, getDataBins, getEffectiveExtent, getPixelWidth, getPlotterIcon, getPlotterName, getWeightCoordIndex, getWeightingDescription, hasReports, readBins
public static final RampKeySet RAMP_KEYSET
public static final ConfigKey<Integer> EXTENT_KEY
public DensogramPlotter(FloatingCoord xCoord, boolean hasWeight)
xCoord
- X axis coordinatehasWeight
- true to permit histogram weightingpublic String getPlotterDescription()
Plotter
Note: really this should appear at the LayerType level.
public ConfigKey<?>[] getStyleKeys()
Plotter
Plotter.createStyle(uk.ac.starlink.ttools.plot2.config.ConfigMap)
method.public DensogramPlotter.DensoStyle 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)
.config
- map of style configuration itemspublic Object getRangeStyleKey(DensogramPlotter.DensoStyle style)
Plotter
extendCoordinateRanges
).
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.
style
- plot style to assessprotected void paintBins(PlanarSurface surface, Pixel1dPlotter.BinArray binArray, DensogramPlotter.DensoStyle style, Graphics2D g)
Pixel1dPlotter
paintBins
in class Pixel1dPlotter<DensogramPlotter.DensoStyle>
surface
- plotting surfacebinArray
- counts per X axis pixelstyle
- plotting styleg
- graphics contextprotected boolean isY(DensogramPlotter.DensoStyle style)
Pixel1dPlotter
isY
in class Pixel1dPlotter<DensogramPlotter.DensoStyle>
style
- plot styleprotected LayerOpt getLayerOpt(DensogramPlotter.DensoStyle style)
Pixel1dPlotter
getLayerOpt
in class Pixel1dPlotter<DensogramPlotter.DensoStyle>
style
- plot styleprotected int getPixelPadding(DensogramPlotter.DensoStyle style, PlanarSurface surf)
Pixel1dPlotter
getPixelPadding
in class Pixel1dPlotter<DensogramPlotter.DensoStyle>
style
- plotting stylesurf
- plotting surfaceprotected Combiner getCombiner(DensogramPlotter.DensoStyle style)
Pixel1dPlotter
getCombiner
in class Pixel1dPlotter<DensogramPlotter.DensoStyle>
style
- plotting styleprotected void extendPixel1dCoordinateRanges(Range[] ranges, boolean[] logFlags, DensogramPlotter.DensoStyle style, DataSpec dataSpec, DataStore dataStore)
Pixel1dPlotter
extendPixel1dCoordinateRanges
in class Pixel1dPlotter<DensogramPlotter.DensoStyle>
ranges
- array of data space dimension ranges to updatelogFlags
- array of linear/log flags corresponding to rangesstyle
- plotting styledataSpec
- data specificationdataStore
- data storage objectPlotLayer.extendCoordinateRanges(uk.ac.starlink.ttools.plot.Range[], boolean[], uk.ac.starlink.ttools.plot2.data.DataStore)
protected ReportMap getPixel1dReport(Pixel1dPlotter.Pixel1dPlan plan, DensogramPlotter.DensoStyle style, boolean xLog)
Pixel1dPlotter
getPixel1dReport
in class Pixel1dPlotter<DensogramPlotter.DensoStyle>
plan
- plotting planstyle
- plot stylexLog
- true iff X axis is logarithmicDrawing.getReport(java.lang.Object)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.