Class AxisTransformLambda
java.lang.Object
io.deephaven.plot.axistransformations.AxisTransformLambda
- All Implemented Interfaces:
AxisTransform,Serializable
Transformations from dataset space to axis space and back.
Axis space refers to how data is displayed in the chart. For example, if the transform from dataset space to axis
space was defined as x^0.5, the dataset values 1, 4, and 9 would be plotted as 1, 2, and 3,] creating a square root
axis scale.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an AxisTransformLambda instance where all dataset values are visible in the plot and the dataset to axis space transform and its inverse are the identity function.AxisTransformLambda(DoubleUnaryOperator dataToAxis, DoubleUnaryOperator axisToData) Creates an AxisTransformLambda instance where all dataset values are visible in the plot.AxisTransformLambda(DoubleUnaryOperator dataToAxis, DoubleUnaryOperator axisToData, DoublePredicate isVisible) Creates an AxisTransformLambda instance. -
Method Summary
Modifier and TypeMethodDescriptiondoubleinverseTransform(double axisValue) Transforms a point in Axis space to dataset space.booleanisVisible(double dataValue) Gets whether a data point is visible in the plot.doubletransform(double dataValue) Transforms a data point to Axis space.
-
Constructor Details
-
AxisTransformLambda
public AxisTransformLambda(DoubleUnaryOperator dataToAxis, DoubleUnaryOperator axisToData, DoublePredicate isVisible) Creates an AxisTransformLambda instance.- Parameters:
dataToAxis- transform from dataset space to axis spaceaxisToData- transform from axis space to dataset spaceisVisible- function that determines if a particular data point should be displayed
-
AxisTransformLambda
Creates an AxisTransformLambda instance where all dataset values are visible in the plot.- Parameters:
dataToAxis- transform from dataset space to axis spaceaxisToData- transform from axis space to dataset space
-
AxisTransformLambda
public AxisTransformLambda()Creates an AxisTransformLambda instance where all dataset values are visible in the plot and the dataset to axis space transform and its inverse are the identity function.
-
-
Method Details
-
transform
public double transform(double dataValue) Description copied from interface:AxisTransformTransforms a data point to Axis space.- Specified by:
transformin interfaceAxisTransform- Parameters:
dataValue- data point- Returns:
- corresponding value in Axis space
-
inverseTransform
public double inverseTransform(double axisValue) Description copied from interface:AxisTransformTransforms a point in Axis space to dataset space.- Specified by:
inverseTransformin interfaceAxisTransform- Parameters:
axisValue- Axis space data point- Returns:
- corresponding value in dataset space
-
isVisible
public boolean isVisible(double dataValue) Description copied from interface:AxisTransformGets whether a data point is visible in the plot.- Specified by:
isVisiblein interfaceAxisTransform- Parameters:
dataValue- data point- Returns:
- whether
dataValueis visible in the plot
-