# ZtoRGBpy

Version 1.0.1 Documentation

# ZtoRGBpy.Scale¶

class Scale[source]

Abstract base class for defining a scaling function for the remapping of complex values to RGB colors.

Automatically generates repr of subclasses (see attributes to define parameters from subclasses).

Variables: __args (Sequence) – List of Positional argument values for specific subclass __kwargs (Mapping) – Mapping of keyword only argument values for specific subclass
__call__(value)[source]

Transform value with scaling function

This method must be overridden by the subclass to define the transformation.

Parameters: value (array_like […]) – Array of value to be transformed, by the scaling function. scaled (array [ value.shape ]) – Scaled transformation ($$T(v)$$) of value such that $$0 \le |T(v)| \le 1$$.
format_arg(arg, cls=None, name=None)[source]

Format argument

Parameters: arg (object) – argument to be formatted cls (type) – class that uses the argument name (str) – name of argument repr (str) – String representation of argument
ticks()[source]

Returns a list of tick marks suitable for a colorbar

This method must be overridden by the subclass to define how tick should be displayed on the colorbar.

Returns: offsets (Sequence [ float ]) – Positions in the scaled interval $$[0.0, 1.0]$$ at which tick marks should be drawn. labels (Sequence [ str ]) – Labels to be displayed for each tick mark, non str types will be converted to str.