An axis that displays numerical values within a fixed range using a modulo
calculation.
autoAdjustRange
protected void autoAdjustRange()
This method should calculate a range that will show all the data values.
For now, it just sets the axis range to the fixedRange.
- autoAdjustRange in interface NumberAxis
getDisplayEnd
public double getDisplayEnd()
Returns the display end value.
getDisplayStart
public double getDisplayStart()
Returns the display start value.
java2DToValue
public double java2DToValue(double java2DValue,
Rectangle2D area,
RectangleEdge edge)
Translates a Java2D coordinate into a data value.
- java2DToValue in interface NumberAxis
java2DValue
- the Java2D coordinate.area
- the area.edge
- the edge.
lengthToJava2D
public double lengthToJava2D(double length,
Rectangle2D area,
RectangleEdge edge)
Converts a length in data coordinates into the corresponding length in
Java2D coordinates.
- lengthToJava2D in interface ValueAxis
length
- the length.area
- the plot area.edge
- the edge along which the axis lies.
- The length in Java2D coordinates.
resizeRange
public void resizeRange(double percent)
Increases or decreases the axis range by the specified percentage about
the central value and sends an
AxisChangeEvent
to all registered
listeners.
To double the length of the axis range, use 200% (2.0).
To halve the length of the axis range, use 50% (0.5).
- resizeRange in interface ValueAxis
percent
- the resize factor.
resizeRange
public void resizeRange(double percent,
double anchorValue)
Increases or decreases the axis range by the specified percentage about
the specified anchor value and sends an
AxisChangeEvent
to all
registered listeners.
To double the length of the axis range, use 200% (2.0).
To halve the length of the axis range, use 50% (0.5).
- resizeRange in interface ValueAxis
percent
- the resize factor.anchorValue
- the new central value after the resize.
setDisplayRange
public void setDisplayRange(double start,
double end)
Sets the display range. The values will be mapped to the fixed range if
necessary.
start
- the start value.end
- the end value.
valueToJava2D
public double valueToJava2D(double value,
Rectangle2D area,
RectangleEdge edge)
Translates a data value to a Java2D coordinate.
- valueToJava2D in interface NumberAxis
value
- the value.area
- the area.edge
- the edge.