public class LogarithmicAxis extends NumberAxis
Modifier and Type | Field and Description |
---|---|
static double |
LOG10_VALUE
Useful constant for log(10).
|
static double |
SMALL_LOG_VALUE
Smallest arbitrarily-close-to-zero value allowed.
|
DEFAULT_AUTO_RANGE_INCLUDES_ZERO, DEFAULT_AUTO_RANGE_STICKY_ZERO, DEFAULT_TICK_UNIT, DEFAULT_VERTICAL_TICK_LABELS
DEFAULT_AUTO_RANGE, DEFAULT_AUTO_RANGE_MINIMUM_SIZE, DEFAULT_AUTO_TICK_UNIT_SELECTION, DEFAULT_INVERTED, DEFAULT_LOWER_BOUND, DEFAULT_LOWER_MARGIN, DEFAULT_RANGE, DEFAULT_UPPER_BOUND, DEFAULT_UPPER_MARGIN, MAXIMUM_TICK_COUNT
DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_AXIS_LINE_PAINT, DEFAULT_AXIS_LINE_STROKE, DEFAULT_AXIS_VISIBLE, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_LABELS_VISIBLE, DEFAULT_TICK_MARK_INSIDE_LENGTH, DEFAULT_TICK_MARK_OUTSIDE_LENGTH, DEFAULT_TICK_MARK_PAINT, DEFAULT_TICK_MARK_STROKE, DEFAULT_TICK_MARKS_VISIBLE
Constructor and Description |
---|
LogarithmicAxis(String label)
Creates a new axis.
|
Modifier and Type | Method and Description |
---|---|
double |
adjustedLog10(double val)
Returns an adjusted log10 value for graphing purposes.
|
double |
adjustedPow10(double val)
Returns an adjusted power of 10 value for graphing purposes.
|
void |
autoAdjustRange()
Rescales the axis to ensure that all data is visible.
|
boolean |
getAllowNegativesFlag()
Returns the 'allowNegativesFlag' flag; true to allow negative values
in data, false to be able to plot positive values arbitrarily close
to zero.
|
boolean |
getAutoRangeNextLogFlag()
Returns the 'autoRangeNextLogFlag' flag.
|
boolean |
getExpTickLabelsFlag()
Returns the 'expTickLabelsFlag' flag.
|
boolean |
getLog10TickLabelsFlag()
Returns the 'log10TickLabelsFlag' flag.
|
boolean |
getStrictValuesFlag()
Returns the 'strictValuesFlag' flag; if true and 'allowNegativesFlag'
is false then this axis will throw a runtime exception if any of its
values are less than or equal to zero; if false then the axis will
adjust for values less than or equal to zero as needed.
|
double |
java2DToValue(double java2DValue,
Rectangle2D plotArea,
org.jfree.ui.RectangleEdge edge)
Converts a coordinate in Java2D space to the corresponding data
value, assuming that the axis runs along one edge of the specified
plotArea.
|
void |
setAllowNegativesFlag(boolean flgVal)
Sets the 'allowNegativesFlag' flag; true to allow negative values
in data, false to be able to plot positive values arbitrarily close to
zero.
|
void |
setAutoRangeNextLogFlag(boolean flag)
Sets the 'autoRangeNextLogFlag' flag.
|
void |
setExpTickLabelsFlag(boolean flgVal)
Sets the 'expTickLabelsFlag' flag.
|
void |
setLog10TickLabelsFlag(boolean flag)
Sets the 'log10TickLabelsFlag' flag.
|
void |
setRange(Range range)
Overridden version that calls original and then sets up flag for
log axis processing.
|
void |
setStrictValuesFlag(boolean flgVal)
Sets the 'strictValuesFlag' flag; if true and 'allowNegativesFlag'
is false then this axis will throw a runtime exception if any of its
values are less than or equal to zero; if false then the axis will
adjust for values less than or equal to zero as needed.
|
double |
switchedPow10(double val)
Returns a power of 10, depending on if values between 0 and
1 are being plotted.
|
double |
valueToJava2D(double value,
Rectangle2D plotArea,
org.jfree.ui.RectangleEdge edge)
Converts a data value to a coordinate in Java2D space, assuming that
the axis runs along one edge of the specified plotArea.
|
void |
zoomRange(double lowerPercent,
double upperPercent)
Zooms in on the current range.
|
clone, configure, createIntegerTickUnits, createIntegerTickUnits, createStandardTickUnits, createStandardTickUnits, draw, equals, getAutoRangeIncludesZero, getAutoRangeStickyZero, getMarkerBand, getNumberFormatOverride, getRangeType, getTickUnit, hashCode, refreshTicks, setAutoRangeIncludesZero, setAutoRangeStickyZero, setMarkerBand, setNumberFormatOverride, setRangeType, setTickUnit, setTickUnit
centerRange, getAutoRangeMinimumSize, getDefaultAutoRange, getDownArrow, getFixedAutoRange, getLeftArrow, getLowerBound, getLowerMargin, getMinorTickCount, getRange, getRightArrow, getStandardTickUnits, getUpArrow, getUpperBound, getUpperMargin, isAutoRange, isAutoTickUnitSelection, isInverted, isNegativeArrowVisible, isPositiveArrowVisible, isVerticalTickLabels, lengthToJava2D, pan, reserveSpace, resizeRange, resizeRange, resizeRange2, setAutoRange, setAutoRangeMinimumSize, setAutoRangeMinimumSize, setAutoTickUnitSelection, setAutoTickUnitSelection, setDefaultAutoRange, setDownArrow, setFixedAutoRange, setInverted, setLeftArrow, setLowerBound, setLowerMargin, setMinorTickCount, setNegativeArrowVisible, setPositiveArrowVisible, setRange, setRange, setRangeAboutValue, setRangeWithMargins, setRangeWithMargins, setRangeWithMargins, setRightArrow, setStandardTickUnits, setUpArrow, setUpperBound, setUpperMargin, setVerticalTickLabels
addChangeListener, createAttributedLabel, getAttributedLabel, getAxisLinePaint, getAxisLineStroke, getFixedDimension, getLabel, getLabelAngle, getLabelFont, getLabelInsets, getLabelLocation, getLabelPaint, getMinorTickMarkInsideLength, getMinorTickMarkOutsideLength, getPlot, getTickLabelFont, getTickLabelInsets, getTickLabelPaint, getTickMarkInsideLength, getTickMarkOutsideLength, getTickMarkPaint, getTickMarkStroke, hasListener, isAxisLineVisible, isMinorTickMarksVisible, isTickLabelsVisible, isTickMarksVisible, isVisible, removeChangeListener, setAttributedLabel, setAttributedLabel, setAxisLinePaint, setAxisLineStroke, setAxisLineVisible, setFixedDimension, setLabel, setLabelAngle, setLabelFont, setLabelInsets, setLabelInsets, setLabelLocation, setLabelPaint, setMinorTickMarkInsideLength, setMinorTickMarkOutsideLength, setMinorTickMarksVisible, setPlot, setTickLabelFont, setTickLabelInsets, setTickLabelPaint, setTickLabelsVisible, setTickMarkInsideLength, setTickMarkOutsideLength, setTickMarkPaint, setTickMarkStroke, setTickMarksVisible, setVisible
public static final double LOG10_VALUE
public static final double SMALL_LOG_VALUE
public LogarithmicAxis(String label)
label
- the axis label.public void setAllowNegativesFlag(boolean flgVal)
flgVal
- the new value of the flag.public boolean getAllowNegativesFlag()
public void setStrictValuesFlag(boolean flgVal)
flgVal
- true for strict enforcement.public boolean getStrictValuesFlag()
true
if strict enforcement is enabled.public void setExpTickLabelsFlag(boolean flgVal)
flgVal
- true for "1e#"-style tick labels, false for
log10 or regular numeric tick labels.public boolean getExpTickLabelsFlag()
true
for "1e#"-style tick labels,
false
for log10 or regular numeric tick labels.public void setLog10TickLabelsFlag(boolean flag)
flag
- true for "10^n"-style tick labels, false for "1e#"-style
or regular numeric tick labels.public boolean getLog10TickLabelsFlag()
true
for "10^n"-style tick labels,
false
for "1e#"-style or regular numeric tick
labels.public void setAutoRangeNextLogFlag(boolean flag)
flag
- true
to make the 'autoAdjustRange()'
method select the next "10^n" values, false
to not.public boolean getAutoRangeNextLogFlag()
true
if the 'autoAdjustRange()' method will
select the next "10^n" values, false
if not.public void setRange(Range range)
setRange
in class ValueAxis
range
- the new range.ValueAxis.getRange()
public double switchedPow10(double val)
val
- the value.switchedLog10(double)
public double adjustedLog10(double val)
val
- value for which log10 should be calculated.adjustedPow10(double)
public double adjustedPow10(double val)
val
- value for which power of 10 should be calculated.adjustedLog10(double)
public void autoAdjustRange()
public double valueToJava2D(double value, Rectangle2D plotArea, org.jfree.ui.RectangleEdge edge)
valueToJava2D
in class NumberAxis
value
- the data value.plotArea
- the area for plotting the data.edge
- the axis location.NumberAxis.java2DToValue(double, Rectangle2D, RectangleEdge)
public double java2DToValue(double java2DValue, Rectangle2D plotArea, org.jfree.ui.RectangleEdge edge)
java2DToValue
in class NumberAxis
java2DValue
- the coordinate in Java2D space.plotArea
- the area in which the data is plotted.edge
- the axis location.NumberAxis.valueToJava2D(double, Rectangle2D, RectangleEdge)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics