|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfree.chart.axis.Axis | +--org.jfree.chart.axis.ValueAxis | +--org.jfree.chart.axis.NumberAxis | +--org.jfree.chart.axis.VerticalNumberAxis | +--org.jfree.chart.axis.VerticalLogarithmicAxis
A logarithmic value axis, for values displayed vertically. Display of positive values arbitrarily close to zero is supported, as well as negative values (if 'allowNegativesFlag' flag set).
Field Summary | |
static double |
LOG10_VALUE
Useful constant for log(10). |
static double |
SMALL_LOG_VALUE
Smallest arbitrarily-close-to-zero value allowed. |
Fields inherited from class org.jfree.chart.axis.VerticalNumberAxis |
DEFAULT_VERTICAL_LABEL |
Fields inherited from class org.jfree.chart.axis.NumberAxis |
DEFAULT_AUTO_RANGE_INCLUDES_ZERO, DEFAULT_AUTO_RANGE_STICKY_ZERO, DEFAULT_TICK_UNIT |
Fields inherited from class org.jfree.chart.axis.ValueAxis |
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 |
Constructor Summary | |
VerticalLogarithmicAxis(java.lang.String label)
Constructs a vertical logarithmic axis, using default values where necessary. |
Method Summary | |
double |
adjustedLog10(double val)
Returns an adjusted log10 value for graphing purposes. |
void |
autoAdjustRange()
Rescales the axis to ensure that all data is visible. |
protected double |
computeLogCeil(double upper)
Returns the smallest (closest to negative infinity) double value that is not less than the argument, is equal to a mathematical integer and satisfying the condition that log base 10 of the value is an integer (i.e., the value returned will be a power of 10: 1, 10, 100, 1000, etc.). |
protected double |
computeLogFloor(double lower)
Returns the largest (closest to positive infinity) double value that is not greater than the argument, is equal to a mathematical integer and satisfying the condition that log base 10 of the value is an integer (i.e., the value returned will be a power of 10: 1, 10, 100, 1000, etc.). |
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 |
getLog10TickLabelsFlag()
Returns the 'log10TickLabelsFlag' flag; true for "10^n"-style tick labels, false for regular numeric labels. |
void |
refreshTicks(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
int location)
Calculates the positions of the tick labels for the axis, storing the results in the tick label list (ready for drawing). |
void |
setAllowNegativesFlag(boolean flag)
Sets the 'allowNegativesFlag' flag; true to allow negative values in data, false to be able to plot positive values arbitrarily close to zero. |
void |
setLog10TickLabelsFlag(boolean flag)
Sets the 'log10TickLabelsFlag' flag; true for "10^n"-style tick labels, false for regular numeric labels. |
void |
setRange(Range range)
Overridden version that calls original and then sets up flag for log axis processing. |
protected void |
setupSmallLogFlag()
Sets up flag for log axis processing. |
protected double |
switchedLog10(double val)
Returns the log10 value, depending on if values between 0 and 1 are being plotted. |
double |
translateJava2DtoValue(float java2DValue,
java.awt.geom.Rectangle2D dataArea)
Converts a coordinate in Java2D space to the corresponding data value, assuming that the axis runs along one edge of the specified dataArea. |
double |
translateValueToJava2D(double value,
java.awt.geom.Rectangle2D dataArea)
Converts a data value to a coordinate in Java2D space, assuming that the axis runs along one edge of the specified plot area. |
Methods inherited from class org.jfree.chart.axis.VerticalNumberAxis |
configure, draw, isCompatiblePlot, isVerticalLabel, reserveWidth, reserveWidth, selectAutoTickUnit, setVerticalLabel |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final double LOG10_VALUE
public static final double SMALL_LOG_VALUE
Constructor Detail |
public VerticalLogarithmicAxis(java.lang.String label)
label
- the axis label (null permitted).Method Detail |
public void setLog10TickLabelsFlag(boolean flag)
flag
- the flag.public boolean getLog10TickLabelsFlag()
public void setAllowNegativesFlag(boolean flag)
flag
- the flag.public boolean getAllowNegativesFlag()
public void setRange(Range range)
setRange
in class ValueAxis
range
- the range.protected void setupSmallLogFlag()
public double translateValueToJava2D(double value, java.awt.geom.Rectangle2D dataArea)
Note that it is possible for the coordinate to fall outside the dataArea.
translateValueToJava2D
in class VerticalNumberAxis
value
- The data value.dataArea
- The area for plotting the data.
public double translateJava2DtoValue(float java2DValue, java.awt.geom.Rectangle2D dataArea)
translateJava2DtoValue
in class VerticalNumberAxis
java2DValue
- The coordinate in Java2D space.dataArea
- The area in which the data is plotted.
public void autoAdjustRange()
autoAdjustRange
in class VerticalNumberAxis
protected double computeLogCeil(double upper)
upper
- a double value above which a ceiling will be calcualted.
protected double computeLogFloor(double lower)
lower
- a double value below which a floor will be calcualted.
public void refreshTicks(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea, int location)
refreshTicks
in class VerticalNumberAxis
g2
- the graphics device.plotArea
- the area in which the plot and the axes should be drawn.dataArea
- the area in which the plot should be drawn.location
- the axis location.protected double switchedLog10(double val)
val
- the value.
public double adjustedLog10(double val)
val
- the value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |