# ZtoRGBpy

Version 1.0.1 Documentation

# ZtoRGBpy.LogScale¶

class LogScale(vmin=0.01, vmax=1.0, *, lmax=0.9)[source]

Logarithmic Scaling

Provides a transformation representing a logarithmic transformation, mapping interval $$[v_{min}, v_{max}]$$ into the interval $$[1-l_{max}, 1]$$.

__call__(value)[source]

Transform value with scaling function

Parameters: value (array_like […]) – Array of values to be transformed, by the scaling function. scaled (array [ value.shape ]) – Scaled transformation ($$T(v)$$) of value

Notes

Performs a logarithmic transformation, mapping the interval $$[v_{min}, v_{max}]$$ into the interval $$[1-l_{max}, 1]$$ using the transformation:

$T(v) = (1 - l_{max}) + \frac{v \cdot log_{10} ( |v| - log_{10} ( v_{min} ) \cdot l_{max} } {|v| \cdot ( log_{10} ( v_{max} ) - log_{10} ( v_{min} ) )}$
ticks()[source]

Returns a list of tick marks suitable for a colorbar

Generates 3 to 6 logarithmic steps such that the steps are all powers of 10 and bound by the interval [vmin, vmax]

Returns: offsets (Sequence [ float ]) – Returns the Sequence $$T(10^{t_{min}}), \dots, T(10^{t_{max}})$$ labels (Sequence [ str ]) – Returns the Sequence $$10^{t_{min}}, \dots, 10^{t_{max}}$$, as strings using latex math, as supported by matplotlib’s maths rendering.