Axis Class
The Axis class is a representation of a single axis as it is typically used in diagrams and charts. An Axis object has a minimum and a maximum value and associated minimum and maximum pixel values. Given a coordinate, that should lie within minimum and maximum, the Axis object can return the corresponding pixel value and vice versa. Furthermore the Axis class can be configured to enable a logarithmic scale and can invert the scale.
Constructor
Axis
(
-
min -
max -
pxmin -
pxmax -
[log]
Parameters:
Methods
coord
(
Number
-
pixel
Get coordinate value for a given pixel (not rounded)
Parameters:
-
pixelNumberPixel (should be between pixel minimum and pixel maximum)
Returns:
invert
()
Invert the axis (swap minimum for maximum)
pixel
(
Number
-
coord
Get pixel value for a given coord (not rounded)
Parameters:
-
coordNumberCoordinate (should be between minimum and maximum)
Returns:
pxrange
(
-
min -
max
Redefine pixel range for current minimal and maximal coordinates
