Skip to main content

Module axis

Module axis 

Source
Expand description

Bounds, axis scales, the data ↔ screen transform, and tick generation.

Structs§

Bounds
An axis-aligned range in data space.
Tick
One tick: its position in scaled space, its label, and whether it is a major tick.
TickRules
Overrides for tick placement, from the plot axis configuration.

Enums§

Minor
How many minor ticks sit between two major ticks.
Scale
How values map onto an axis.

Functions§

format_readout
A readable value for tooltips: about 4 significant digits.
format_value
A value at the precision of step, switching to scientific notation for very large or very small magnitudes. -0 prints as 0.
nice_step
The nice step for a span split into about target intervals.
ticks
“Nice” ticks (1, 2, 5 × 10ⁿ) in [min, max] (scaled space), about pixels / spacing of them, with labels formatted to the step’s precision, plus minor ticks.