java.lang.Object | ||||
↳ | org.jfree.chart.axis.Axis | |||
↳ | org.jfree.chart.axis.ValueAxis | |||
↳ | org.jfree.chart.axis.NumberAxis | |||
↳ | org.jfree.chart.axis.LogarithmicAxis |
A numerical axis that uses a logarithmic scale.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
double | SMALL_LOG_VALUE | Smallest arbitrarily-close-to-zero value allowed. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
LOG10_VALUE | Useful constant for log(10). | ||||||||||
allowNegativesFlag | Flag set true to allow negative values in data. | ||||||||||
autoRangeNextLogFlag | True to make 'autoAdjustRange()' select "10^n" values. | ||||||||||
expTickLabelsFlag | Flag set true for "1e#"-style tick labels. | ||||||||||
log10TickLabelsFlag | Flag set true for "10^n"-style tick labels. | ||||||||||
numberFormatterObj | Number formatter for generating numeric strings. | ||||||||||
smallLogFlag | Helper flag for log axis processing. | ||||||||||
strictValuesFlag | Flag set true make axis throw exception if any values are <= 0 and 'allowNegativesFlag' is false. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new axis.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an adjusted log10 value for graphing purposes.
| |||||||||||
Returns an adjusted power of 10 value for graphing purposes.
| |||||||||||
Rescales the axis to ensure that all data is visible.
| |||||||||||
Returns the 'allowNegativesFlag' flag; true to allow negative values
in data, false to be able to plot positive values arbitrarily close
to zero.
| |||||||||||
Returns the 'autoRangeNextLogFlag' flag.
| |||||||||||
Returns the 'expTickLabelsFlag' flag.
| |||||||||||
Returns the 'log10TickLabelsFlag' flag.
| |||||||||||
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.
| |||||||||||
Converts a coordinate in Java2D space to the corresponding data
value, assuming that the axis runs along one edge of the specified
plotArea.
| |||||||||||
Sets the 'allowNegativesFlag' flag; true to allow negative values
in data, false to be able to plot positive values arbitrarily close to
zero.
| |||||||||||
Sets the 'autoRangeNextLogFlag' flag.
| |||||||||||
Sets the 'expTickLabelsFlag' flag.
| |||||||||||
Sets the 'log10TickLabelsFlag' flag.
| |||||||||||
Overridden version that calls original and then sets up flag for
log axis processing.
| |||||||||||
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.
| |||||||||||
Returns a power of 10, depending on if values between 0 and
1 are being plotted.
| |||||||||||
Converts a data value to a coordinate in Java2D space, assuming that
the axis runs along one edge of the specified plotArea.
| |||||||||||
Zooms in on the current range.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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.).
| |||||||||||
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.).
| |||||||||||
Converts the given value to a tick label string.
| |||||||||||
Converts the given value to a tick label string.
| |||||||||||
Calculates the positions of the tick labels for the axis, storing the
results in the tick label list (ready for drawing).
| |||||||||||
Calculates the positions of the tick labels for the axis, storing the
results in the tick label list (ready for drawing).
| |||||||||||
Sets up the number formatter object according to the
'expTickLabelsFlag' flag.
| |||||||||||
Sets up flag for log axis processing.
| |||||||||||
Returns the log10 value, depending on if values between 0 and
1 are being plotted.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Smallest arbitrarily-close-to-zero value allowed.
Useful constant for log(10).
Flag set true to allow negative values in data.
True to make 'autoAdjustRange()' select "10^n" values.
Flag set true for "1e#"-style tick labels.
Flag set true for "10^n"-style tick labels.
Helper flag for log axis processing.
Flag set true make axis throw exception if any values are <= 0 and 'allowNegativesFlag' is false.
Returns an adjusted log10 value for graphing purposes. The first adjustment is that negative values are changed to positive during the calculations, and then the answer is negated at the end. The second is that, for values less than 10, an increasingly large (0 to 1) scaling factor is added such that at 0 the value is adjusted to 1, resulting in a returned result of 0.
val | value for which log10 should be calculated. |
---|
Returns an adjusted power of 10 value for graphing purposes. The first adjustment is that negative values are changed to positive during the calculations, and then the answer is negated at the end. The second is that, for values less than 1, a progressive logarithmic offset is subtracted such that at 0 the returned result is also 0.
val | value for which power of 10 should be calculated. |
---|
Rescales the axis to ensure that all data is visible.
Returns the 'allowNegativesFlag' flag; true to allow negative values in data, false to be able to plot positive values arbitrarily close to zero.
Returns the 'autoRangeNextLogFlag' flag.
true
if the 'autoAdjustRange()' method will
select the next "10^n" values, false
if not.
Returns the 'expTickLabelsFlag' flag.
true
for "1e#"-style tick labels,
false
for log10 or regular numeric tick labels.
Returns the 'log10TickLabelsFlag' flag.
true
for "10^n"-style tick labels,
false
for "1e#"-style or regular numeric tick
labels.
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.
true
if strict enforcement is enabled.
Converts a coordinate in Java2D space to the corresponding data value, assuming that the axis runs along one edge of the specified plotArea.
java2DValue | the coordinate in Java2D space. |
---|---|
plotArea | the area in which the data is plotted. |
edge | the axis location. |
Sets the 'allowNegativesFlag' flag; true to allow negative values in data, false to be able to plot positive values arbitrarily close to zero.
flgVal | the new value of the flag. |
---|
Sets the 'autoRangeNextLogFlag' flag. This determines whether or not the 'autoAdjustRange()' method will select the next "10^n" values when determining the upper and lower bounds. The default value is false.
flag | true to make the 'autoAdjustRange()'
method select the next "10^n" values, false to not.
|
---|
Sets the 'expTickLabelsFlag' flag. If the 'log10TickLabelsFlag' is false then this will set whether or not "1e#"-style tick labels are used. The default is to use regular numeric tick labels.
flgVal | true for "1e#"-style tick labels, false for log10 or regular numeric tick labels. |
---|
Sets the 'log10TickLabelsFlag' flag. The default value is false.
flag | true for "10^n"-style tick labels, false for "1e#"-style or regular numeric tick labels. |
---|
Overridden version that calls original and then sets up flag for log axis processing.
range | the new range. |
---|
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.
flgVal | true for strict enforcement. |
---|
Returns a power of 10, depending on if values between 0 and 1 are being plotted. If negative values are not allowed and the lower bound is between 0 and 10 then a normal power is returned; otherwise the returned value is adjusted if the given value is less than 1.
val | the value. |
---|
Converts a data value to a coordinate in Java2D space, assuming that the axis runs along one edge of the specified plotArea. Note that it is possible for the coordinate to fall outside the plotArea.
value | the data value. |
---|---|
plotArea | the area for plotting the data. |
edge | the axis location. |
Zooms in on the current range.
lowerPercent | the new lower bound. |
---|---|
upperPercent | the new upper bound. |
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.).
upper | a double value above which a ceiling will be calcualted. |
---|
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.).
lower | a double value below which a floor will be calcualted. |
---|
Converts the given value to a tick label string.
val | the value to convert. |
---|
Converts the given value to a tick label string.
val | the value to convert. |
---|---|
forceFmtFlag | true to force the number-formatter object to be used. |
Calculates the positions of the tick labels for the axis, storing the results in the tick label list (ready for drawing).
g2 | the graphics device. |
---|---|
dataArea | the area in which the plot should be drawn. |
edge | the location of the axis. |
Calculates the positions of the tick labels for the axis, storing the results in the tick label list (ready for drawing).
g2 | the graphics device. |
---|---|
dataArea | the area in which the plot should be drawn. |
edge | the location of the axis. |
Sets up the number formatter object according to the 'expTickLabelsFlag' flag.
Sets up flag for log axis processing. Set true if negative values not allowed and the lower bound is between 0 and 10.
Returns the log10 value, depending on if values between 0 and 1 are being plotted. If negative values are not allowed and the lower bound is between 0 and 10 then a normal log is returned; otherwise the returned value is adjusted if the given value is less than 10.
val | the value. |
---|