Modifier and Type | Field and Description |
---|---|
static Normalisation |
AREA
The total area of histogram bars is normalised to unity.
|
static Normalisation |
HEIGHT
The total height of histogram bars is normalised to unity.
|
static Normalisation |
MAXIMUM
Height of the tallest histogram bar is normalised to unity.
|
static Normalisation |
NONE
No normalisation is performed.
|
static Normalisation |
UNIT
Bars scaled by inverse bin width.
|
Modifier | Constructor and Description |
---|---|
protected |
Normalisation(String name,
String description)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns a short description of this mode.
|
static Normalisation[] |
getKnownValues()
Returns the Normalisation instances defined by this class.
|
abstract double |
getScaleFactor(double sum,
double max,
double binWidth,
Combiner.Type ctype,
boolean isCumulative)
Returns the value by which all bins should be scaled to achieve
normalisation for a given data set.
|
String |
toString() |
public static final Normalisation NONE
public static final Normalisation AREA
public static final Normalisation UNIT
public static final Normalisation MAXIMUM
public static final Normalisation HEIGHT
public String getDescription()
public abstract double getScaleFactor(double sum, double max, double binWidth, Combiner.Type ctype, boolean isCumulative)
The binWidth
should at least make sense in terms
of screen area. For linear X axis, it should be in data units,
but for logarithmic X axis it may have to be in log(data units).
The binWidth
is only used by AREA and UNIT modes.
For cumulative plots, all the modes except NONE behave the same, normalising the total value to unity. The Combiner.Type may result in scaling the values by the inverse of the bin width. However, that is sometimes done anyway (UNIT and AREA modes), so for those cases it's ignored, since you don't want to apply that correction twice.
sum
- total height of all histogram barsmax
- height of tallest histogram barbinWidth
- constant linear width of histogram bars, or NaNctype
- combiner type used to populate binsisCumulative
- true iff the plot is cumulativepublic static Normalisation[] getKnownValues()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.