Klasse LogarithmicRenderer2D
- Alle implementierten Schnittstellen:
AxisRenderer
An AxisRenderer with a base-10 logarithmic scale: each decade
takes the same distance on screen, which is what makes data spanning several
orders of magnitude readable.
plot.setAxisRenderer(XYPlot.AXIS_X, new LogarithmicRenderer2D()); plot.getAxis(XYPlot.AXIS_X).setRange(1.0, 1000.0);
Ticks are laid out per decade rather than at a fixed distance: a major tick at each power of ten, with the minor ticks distributed over the decade that follows it. The tick spacing and the minor tick count are therefore interpreted relative to a decade, not in axis units as they are on a linear axis.
A logarithm is only defined for positive values, so the axis range must
not be negative: converting a value against a negative minimum or maximum
throws IllegalStateException. A minimum of zero is tolerated but
unhelpful, since zero is infinitely far from any positive value on this
scale; start the range at a small positive number instead.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreates a new renderer for logarithmic scaled axes in two-dimensional space. -
Methodenübersicht
Modifikator und TypMethodeBeschreibungprotected voidcreateTicks(List<Tick> ticks, Axis axis, double min, double max, Set<Double> tickPositions, boolean isAutoSpacing) Adds minor and major ticks to a list of ticks.Returns a list of all tick element on the axis.viewToWorld(Axis axis, double value, boolean extrapolate) Converts a view (screen) coordinate value to a world (axis) coordinate value.doubleworldToView(Axis axis, Number value, boolean extrapolate) Converts a world (axis) coordinate value to a view (screen) coordinate value.Von Klasse geerbte Methoden AbstractAxisRenderer2D
createTicksCustom, evaluateShape, getCustomTicks, getIntersection, getLabel, getLabelDistance, getMinorTickAlignment, getMinorTickColor, getMinorTickLength, getMinorTicksCount, getMinorTickStroke, getNormal, getPosition, getRendererComponent, getShape, getShapeColor, getShapeLength, getShapeStroke, getTick, getTickAlignment, getTickColor, getTickFont, getTickLabelDistance, getTickLabelDistanceAbsolute, getTickLabelFormat, getTickLabelRotation, getTickLength, getTickLengthAbsolute, getTickMinorLengthAbsolute, getTickSpacing, getTickStroke, isMinorTicksVisible, isShapeDirectionSwapped, isShapeNormalOrientationClockwise, isShapeVisible, isTickLabelsOutside, isTickLabelsVisible, isTicksAutoSpaced, isTicksVisible, setCustomTicks, setIntersection, setLabel, setLabelDistance, setMinorTickAlignment, setMinorTickColor, setMinorTickLength, setMinorTicksCount, setMinorTickStroke, setMinorTicksVisible, setShape, setShapeColor, setShapeDirectionSwapped, setShapeNormalOrientationClockwise, setShapeStroke, setShapeVisible, setTickAlignment, setTickColor, setTickFont, setTickLabelDistance, setTickLabelFormat, setTickLabelRotation, setTickLabelsOutside, setTickLabelsVisible, setTickLength, setTicksAutoSpaced, setTickSpacing, setTickStroke, setTicksVisible
-
Konstruktordetails
-
LogarithmicRenderer2D
public LogarithmicRenderer2D()Creates a new renderer for logarithmic scaled axes in two-dimensional space.
-
-
Methodendetails
-
worldToView
Converts a world (axis) coordinate value to a view (screen) coordinate value.- Parameter:
axis- Axisvalue- World coordinate value to convertextrapolate- Option to activate extrapolation value that are not on the axis- Gibt zurück:
- Screen coordinate value
-
viewToWorld
Converts a view (screen) coordinate value to a world (axis) coordinate value.- Parameter:
axis- Axisvalue- View coordinate value to convertextrapolate- Option to activate extrapolation value that are not on the axis- Gibt zurück:
- World coordinate value
-
getTicks
Beschreibung aus Klasse kopiert:AbstractAxisRenderer2DReturns a list of all tick element on the axis.- Angegeben von:
getTicksin SchnittstelleAxisRenderer- Setzt außer Kraft:
getTicksin KlasseAbstractAxisRenderer2D- Parameter:
axis- Axis- Gibt zurück:
- A list of
Tickinstances
-
createTicks
protected void createTicks(List<Tick> ticks, Axis axis, double min, double max, Set<Double> tickPositions, boolean isAutoSpacing) Beschreibung aus Klasse kopiert:AbstractAxisRenderer2DAdds minor and major ticks to a list of ticks.- Angegeben von:
createTicksin KlasseAbstractAxisRenderer2D- Parameter:
ticks- List of ticksaxis- Axismin- Minimum value of axismax- Maximum value of axistickPositions- Set of tick positionsisAutoSpacing- Use automatic scaling
-