ZtoRGBpy

Version 1.0.1 Documentation

ZtoRGBpy.LinearScale

class LinearScale(vmax=1.0)[source]

Linear Scaling

Provides a transformation representing a simple linear transformation, mapping the interval``[0.0, vmax]`` into the interval [0.0, 1.0], when invoked.

ticks()[source]

Returns a list of tick marks suitable for a colorbar

Generates 4 to 10 linear steps where the steps are \(S = 10^m \cdot \{ 5, 10, 20, 25 \}\) with \(m \in \mathbb{Z}\) and starting at 0 to give \(N\) steps.

Returns:
  • offsets (Sequence [ float ]) – Returns the Sequence \(0, \frac{S}{vmax}, \dots, \frac{(N - 1) \cdot S}{vmax}\)
  • labels (Sequence [ str ]) – Returns the Sequence \(0, S, \dots, (N-1) \cdot S\), formatted using the General format ('g').