Coordinates Transformation
Defines the coordinate system transformation applied to the plot.
The coordinatesTransformation
property enables customization of how data points are projected onto the plot's axes. If not explicitly set, the transformation is automatically selected based on the provided data and configured layers.
CoordinatesTransformation
A class that represents plotting coordinates system transformation.
CoordinatesTransformation.cartesian()
— a Cartesian coordinate system transformation. This coordinate system is the standard 2-dimensional coordinate system used in most plots, where the horizontal axis represents X values and the vertical axis represents Y values. Default for most layers.CoordinatesTransformation.cartesianFixed(ratio: Double = 1.0)
— a Cartesian coordinate system with a fixed aspect ratio transformation. This coordinate system maintains a consistent proportional relationship between the X and Y axes, controlled by theratio
parameter. Theratio
specifies how many units on the y-axis correspond to a single unit on the x-axis. Whenratio
is set to 1.0 (default), one unit on the x-axis is equivalent to one unit on the y-axis, resulting in equal scaling for both axes. Aratio
greater than 1.0 will make units on the y-axis proportionally longer than those on the x-axis, whereas aratio
less than 1.0 will make units on the x-axis proportionally longer. Default fortiles
layer.CoordinatesTransformation.cartesianFlipped()
— a Cartesian coordinate system with swapped axes transformation. In this coordinate system, the x-axis is oriented vertically, and the y-axis is oriented horizontally.CoordinatesTransformation.cartesianFlippedFixed(ratio: Double = 1.0)
— a Cartesian coordinate system with swapped axes and a fixed aspect ratio transformation. This coordinate system flips the orientation of the axes, so the x-axis is oriented vertically, and the y-axis is oriented horizontally, while maintaining a consistent proportional relationship between these axes, controlled by theratio
parameter. Theratio
specifies how many units on the new y-axis (originally the x-axis) correspond to a single unit on the new x-axis (originally the y-axis). Whenratio
is set to 1.0 (default), one unit on the new x-axis is equivalent to one unit on the new y-axis, resulting in equal scaling for both axes. Aratio
greater than 1.0 will make units on the new y-axis proportionally longer than those on the new x-axis, whereas aratio
less than 1.0 will make units on the new x-axis proportionally longer.