Class SpaceTransformedRegularTickProvider
java.lang.Object
org.jzy3d.plot3d.primitives.axis.layout.providers.AbstractTickProvider
org.jzy3d.plot3d.primitives.axis.layout.providers.RegularTickProvider
org.jzy3d.plot3d.primitives.axis.layout.providers.SpaceTransformedRegularTickProvider
- All Implemented Interfaces:
ITickProvider
Build a sequence of regularly spaced ticks in case of space transformed charts (e.g. log charts).
- Author:
- martin
-
Field Summary
Fields inherited from class org.jzy3d.plot3d.primitives.axis.layout.providers.RegularTickProvider
steps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble[]
generateTicks
(double min, double max, int steps) Able to generate ticks that will visually look equally spaced, despite an existing space transform in the chart.Methods inherited from class org.jzy3d.plot3d.primitives.axis.layout.providers.RegularTickProvider
getSteps
Methods inherited from class org.jzy3d.plot3d.primitives.axis.layout.providers.AbstractTickProvider
generateTicks
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jzy3d.plot3d.primitives.axis.layout.providers.ITickProvider
generateTicks
-
Constructor Details
-
SpaceTransformedRegularTickProvider
public SpaceTransformedRegularTickProvider() -
SpaceTransformedRegularTickProvider
public SpaceTransformedRegularTickProvider(int steps)
-
-
Method Details
-
generateTicks
public double[] generateTicks(double min, double max, int steps) Able to generate ticks that will visually look equally spaced, despite an existing space transform in the chart. The idea is that without knowing the space transform, neither the reverse of this function, we deduce it from the min-max range by computing the stepFactor that can be used to get the following tick sequence :- Z0 = min
- Z1 = Z0 * stepFactor
- Z2 = Z1 * stepFactor
- Z3 = max
- zmax / Math.pow(stepFactor, numberOfTicks) = zmin, equivalent to
- Math.pow(stepFactor, numberOfTicks) = zmax/zmin, equivalent to
- stepFactor = Math.pow(zmax/zmin, 1/steps)
- as Math.pow(x,n)=a is reversed by x=Math.pow(a,1/n)
- Specified by:
generateTicks
in interfaceITickProvider
- Overrides:
generateTicks
in classRegularTickProvider
-