ClippedColormap¶
- class msaexp.utils.ClippedColormap(cmap='Spectral', max_lightness=90, norm=None, vmin=None, vmax=None, **kwargs)[source]¶
Bases:
ColorizerColor map with Lightness clipped to a maximum value
- Parameters
- cmap
matplotlibcolormap Colormap object, e.g.,
matplotlib.cm.Spectral.- max_lightnessfloat
Maximum lightness to allow (0 - 100)
- cmap
Attributes Summary
Autoscale the scalar limits on the norm instance using the current array
Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None
Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal.
Return the values (min, max) that are mapped to the colormap limits.
Set the norm limits for image scaling.
Methods Summary
__call__(x, **kwargs)Call self as a function.
clip_color_lightness(rgba[, max_lightness])Clip color to maximum lightness
get_color_lightness(rgba, **kwargs)Get color Lightness
to_rgba(x[, autoscale, vmin, vmax])Override the to_rgba method with clipped lightness values
Attributes Documentation
- N = 0¶
- autoscale¶
- autoscale_None¶
- callbacks¶
- changed¶
- clip¶
- colorbar = None¶
- get_clim¶
- max_lightness = 90¶
- norm¶
- set_clim¶
- stale¶
- vmax¶
- vmin¶
Methods Documentation
- static clip_color_lightness(rgba, max_lightness=85, **kwargs)[source]¶
Clip color to maximum lightness
Conversion from https://matplotlib.org/stable/users/explain/colors/colormaps.html