|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.layer.BinSizer
@Equality public abstract class BinSizer
Determines 1-d histogram bin widths from data bounds.
Nested Class Summary | |
---|---|
static class |
BinSizer.BinSizerSpecifier
Specifier for BinSizer values. |
Constructor Summary | |
---|---|
BinSizer()
|
Method Summary | |
---|---|
static BinSizer |
createCountBinSizer(double nbin,
boolean rounding)
Returns a bin sizer instance which divides the axis range up into a fixed number of equal intervals. |
static BinSizer |
createFixedBinSizer(double binWidth)
Returns a bin sizer instance which always returns the same fixed value. |
static ConfigKey<BinSizer> |
createSizerConfigKey(ConfigMeta meta,
ReportKey<Double> widthReportKey,
int dfltNbin,
boolean rounding,
boolean allowZero)
Constructs a config key for acquiring BinSizers. |
static String |
getConfigKeyDescription()
Returns an XML string describing in general terms how to operate the BinSizer config key. |
abstract double |
getWidth(boolean xlog,
double xlo,
double xhi)
Provides a bin width value for a given axis data range. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinSizer()
Method Detail |
---|
public abstract double getWidth(boolean xlog, double xlo, double xhi)
xlog
- false for linear scaling, true for logarithmicxlo
- axis lower boundxhi
- axis upper bound
public static BinSizer createFixedBinSizer(double binWidth)
binWidth
- fixed bin width
public static BinSizer createCountBinSizer(double nbin, boolean rounding)
nbin
- number of intervals to divide the axis intorounding
- if true, only round numbers are returned
public static ConfigKey<BinSizer> createSizerConfigKey(ConfigMeta meta, ReportKey<Double> widthReportKey, int dfltNbin, boolean rounding, boolean allowZero)
meta
- key metadatawidthReportKey
- report key giving bin width in data coordinatesdfltNbin
- default bin countrounding
- true to prefer round numbers for output bin widthsallowZero
- true iff zero is an allowed width
public static String getConfigKeyDescription()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |