T
- Used to enforce that this instance only accepts
AxisScalePolicyTransformation
and subtypes.public class AxisLog10<T extends AxisScalePolicyTransformation> extends AAxisTransformation<T>
AAxis
with log base 10 scaled
display of values.
This will even not work with values < 1.0 as the log transformation turns
negative for values < 1.0 and becomes Double.NEGATIVE_INFINITY
with
lim -> 0.0 with more and more turns to a 100 % CPU load.
AAxisTransformation.XDataAccessor, AAxisTransformation.YDataAccessor
AAxis.AChart2DDataAccessor
IAxis.AxisTitle
m_outputErrorTstamp
DEBUG, m_accessor, m_formatter, m_majorTickSpacing, m_max, m_min, m_minorTickSpacing, m_needsFullRescale, m_rangePolicy
PROPERTY_ADD_REMOVE_TRACE, PROPERTY_AXIS_SCALE_POLICY_CHANGED, PROPERTY_LABELFORMATTER, PROPERTY_PAINTGRID, PROPERTY_PAINTSCALE, PROPERTY_RANGEPOLICY
Constructor and Description |
---|
AxisLog10()
Creates an instance that uses a
LabelFormatterSimple for formatting
numbers and a AxisScalePolicyAutomaticBestFit for controlling the
scale. |
AxisLog10(IAxisLabelFormatter formatter,
T scalePolicy)
Constructor that uses the given label formatter for formatting labels.
|
Modifier and Type | Method and Description |
---|---|
double |
transform(double in)
Performs
Math.log10(double) with a check for reaching infinity. |
double |
untransform(double in)
Template method for performing the reverse axis transformation.
|
createAccessor, getMaxTransformed, getMinTransformed, getScaledValue, scaleTrace, translateMousePosition, translatePxToValue
addPropertyChangeListener, addTrace, ensureInitialized, equals, findMax, findMin, getAccessor, getAxisPosition, getAxisScalePolicy, getAxisTitle, getDimension, getDimensionString, getFormatter, getHeight, getMajorTickSpacing, getMax, getMaxValue, getMin, getMinorTickSpacing, getMinValue, getPixelXLeft, getPixelXRight, getPixelYBottom, getPixelYTop, getPropertyChangeListeners, getRange, getRangePolicy, getTitle, getTitlePainter, getTraces, getValueDistanceForPixel, getWidth, hashCode, hasTrace, initPaintIteration, isDirtyScaling, isPaintGrid, isPaintScale, isStartMajorTick, isVisible, paint, paintTitle, propertyChange, removeAllTraces, removeAxisTitle, removePropertyChangeListener, removeTrace, scale, scalePoint, setAccessor, setAxisPosition, setAxisScalePolicy, setAxisTitle, setChart, setFormatter, setMajorTickSpacing, setMinorTickSpacing, setPaintGrid, setPaintScale, setPixelXLeft, setPixelXRight, setPixelYBottom, setPixelYTop, setRange, setRangePolicy, setStartMajorTick, setTitle, setTitlePainter, setVisible, translateValueToPx
public AxisLog10()
LabelFormatterSimple
for formatting
numbers and a AxisScalePolicyAutomaticBestFit
for controlling the
scale.
public AxisLog10(IAxisLabelFormatter formatter, T scalePolicy)
formatter
- needed for formatting labels of this axis. Prefer using simple
implementations like LabelFormatterSimple
, a log axis is
complicated enough to understand.scalePolicy
- controls the ticks/labels and their distance.public double transform(double in)
Math.log10(double)
with a check for reaching infinity.
The argument should not be negative, so only normalized values (no chart values but their scaled values or pixel values) should be given here.
If the argument is close to zero, the result of log would be
Double.POSITIVE_INFINITY
which is transformed to
Double.MAX_VALUE
.
transform
in class AAxisTransformation<T extends AxisScalePolicyTransformation>
in
- the value to compute the log base 10 of.public double untransform(double in)
AAxisTransformation
This is the counterpart to AAxisTransformation.transform(double)
.
untransform
in class AAxisTransformation<T extends AxisScalePolicyTransformation>
in
- the transformed value.AAxisTransformation.untransform(double)
Copyright © 2001 - 2010 LGPL, All Rights Footloose.