java.lang.Object | |||
↳ | org.jfree.chart.axis.Axis | ||
↳ | org.jfree.chart.axis.ValueAxis | ||
↳ | org.jfree.chart.axis.LogAxis |
A numerical axis that uses a logarithmic scale. The class is an
alternative to the LogarithmicAxis
class.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new
LogAxis with no label. | |||||||||||
Creates a new
LogAxis with the given label. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calculates the log of the given value, using the current base.
| |||||||||||
Calculates the value from a given log.
| |||||||||||
Configures the axis.
| |||||||||||
Returns a collection of tick units for log (base 10) values.
| |||||||||||
Draws the axis on a Java 2D graphics device (such as the screen or a
printer).
| |||||||||||
Tests this axis for equality with an arbitrary object.
| |||||||||||
Converts a length in data coordinates into the corresponding length in
Java2D coordinates.
| |||||||||||
Returns the base for the logarithm calculation.
| |||||||||||
Returns the number format override.
| |||||||||||
Returns the smallest value represented by the axis.
| |||||||||||
Returns the current tick unit.
| |||||||||||
Returns a hash code for this instance.
| |||||||||||
Converts a Java2D coordinate to an axis value, assuming that the
axis covers the specified
edge of the area . | |||||||||||
Slides the axis range by the specified percentage.
| |||||||||||
Calculates the positions of the tick labels for the axis, storing the
results in the tick label list (ready for drawing).
| |||||||||||
Sets the base for the logarithm calculation and sends an
AxisChangeEvent to all registered listeners. | |||||||||||
Sets the number format override.
| |||||||||||
Sets the smallest value represented by the axis and sends an
AxisChangeEvent to all registered listeners. | |||||||||||
Sets the tick unit for the axis and sends an
AxisChangeEvent to
all registered listeners. | |||||||||||
Sets the tick unit for the axis and, if requested, sends an
AxisChangeEvent to all registered listeners. | |||||||||||
Converts a value on the axis scale to a Java2D coordinate relative to
the given
area , based on the axis running along the
specified edge . | |||||||||||
Zooms in on the current range.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adjusts the axis range to match the data range that the axis is
required to display.
| |||||||||||
Creates a tick label for the specified value.
| |||||||||||
Estimates the maximum tick label height.
| |||||||||||
Estimates the maximum width of the tick labels, assuming the specified
tick unit is used.
| |||||||||||
Returns a list of ticks for an axis at the top or bottom of the chart.
| |||||||||||
Returns a list of ticks for an axis at the left or right of the chart.
| |||||||||||
Selects an appropriate tick value for the axis.
| |||||||||||
Selects an appropriate tick value for the axis.
| |||||||||||
Selects an appropriate tick value for the axis.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new LogAxis
with no label.
Creates a new LogAxis
with the given label.
label | the axis label (null permitted).
|
---|
Calculates the log of the given value, using the current base.
value | the value. |
---|
Calculates the value from a given log.
log | the log value (must be > 0.0). |
---|
Configures the axis. This method is typically called when an axis is assigned to a new plot.
Returns a collection of tick units for log (base 10) values. Uses a given Locale to create the DecimalFormats.
locale | the locale to use to represent Numbers. |
---|
Draws the axis on a Java 2D graphics device (such as the screen or a printer).
g2 | the graphics device (null not permitted). |
---|---|
cursor | the cursor location (determines where to draw the axis). |
plotArea | the area within which the axes and plot should be drawn. |
dataArea | the area within which the data should be drawn. |
edge | the axis location (null not permitted). |
plotState | collects information about the plot
(null permitted). |
null
).
Tests this axis for equality with an arbitrary object.
obj | the object (null permitted). |
---|
Converts a length in data coordinates into the corresponding length in Java2D coordinates.
length | the length. |
---|---|
area | the plot area. |
edge | the edge along which the axis lies. |
Returns the base for the logarithm calculation.
Returns the number format override. If this is non-null, then it will be used to format the numbers on the axis.
null
).Returns the smallest value represented by the axis.
Returns a hash code for this instance.
Converts a Java2D coordinate to an axis value, assuming that the
axis covers the specified edge
of the area
.
java2DValue | the Java2D coordinate. |
---|---|
area | the area. |
edge | the edge that the axis belongs to. |
Slides the axis range by the specified percentage.
percent | the percentage. |
---|
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. |
---|---|
state | the axis state. |
dataArea | the area in which the plot should be drawn. |
edge | the location of the axis. |
Sets the base for the logarithm calculation and sends an
AxisChangeEvent
to all registered listeners.
base | the base value (must be > 1.0). |
---|
Sets the number format override. If this is non-null, then it will be used to format the numbers on the axis.
formatter | the number formatter (null permitted). |
---|
Sets the smallest value represented by the axis and sends an
AxisChangeEvent
to all registered listeners.
value | the value. |
---|
Sets the tick unit for the axis and sends an AxisChangeEvent
to
all registered listeners. A side effect of calling this method is that
the "auto-select" feature for tick units is switched off (you can
restore it using the setAutoTickUnitSelection(boolean)
method).
unit | the new tick unit (null not permitted). |
---|
Sets the tick unit for the axis and, if requested, sends an
AxisChangeEvent
to all registered listeners. In addition, an
option is provided to turn off the "auto-select" feature for tick units
(you can restore it using the
setAutoTickUnitSelection(boolean)
method).
unit | the new tick unit (null not permitted). |
---|---|
notify | notify listeners? |
turnOffAutoSelect | turn off the auto-tick selection? |
Converts a value on the axis scale to a Java2D coordinate relative to
the given area
, based on the axis running along the
specified edge
.
value | the data value. |
---|---|
area | the area. |
edge | the edge. |
value
.
Zooms in on the current range.
lowerPercent | the new lower bound. |
---|---|
upperPercent | the new upper bound. |
Adjusts the axis range to match the data range that the axis is required to display.
Creates a tick label for the specified value. Note that this method was 'private' prior to version 1.0.10.
value | the value. |
---|
Estimates the maximum tick label height.
g2 | the graphics device. |
---|
Estimates the maximum width of the tick labels, assuming the specified tick unit is used.
Rather than computing the string bounds of every tick on the axis, we just look at two values: the lower bound and the upper bound for the axis. These two values will usually be representative.
g2 | the graphics device. |
---|---|
unit | the tick unit to use for calculation. |
Returns a list of ticks for an axis at the top or bottom of the chart.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
edge | the edge. |
Returns a list of ticks for an axis at the left or right of the chart.
g2 | the graphics device. |
---|---|
dataArea | the data area. |
edge | the edge. |
Selects an appropriate tick value for the axis. The strategy is to display as many ticks as possible (selected from an array of 'standard' tick units) without the labels overlapping.
g2 | the graphics device. |
---|---|
dataArea | the area defined by the axes. |
edge | the axis location. |
Selects an appropriate tick value for the axis. The strategy is to display as many ticks as possible (selected from an array of 'standard' tick units) without the labels overlapping.
g2 | the graphics device. |
---|---|
dataArea | the area defined by the axes. |
edge | the axis location. |
Selects an appropriate tick value for the axis. The strategy is to display as many ticks as possible (selected from an array of 'standard' tick units) without the labels overlapping.
g2 | the graphics device. |
---|---|
dataArea | the area in which the plot should be drawn. |
edge | the axis location. |