Logo Iris 1.12

Previous topic

iris.iterate

Next topic

iris.pandas

This Page

iris.palette

Load, configure and register color map palettes and initialise color map meta-data mappings.

In this module:

iris.palette.auto_palette(func)

Decorator wrapper function to control the default behaviour of the matplotlib cmap and norm keyword arguments.

Args:

  • func (callable):

    Callable function to be wrapped by the decorator.

Returns:
Closure wrapper function.

↑ top ↑

iris.palette.cmap_norm(cube)

Determine the default matplotlib.colors.LinearSegmentedColormap and iris.palette.SymmetricNormalize instances associated with the cube.

Args:

  • cube (iris.cube.Cube):

    Source cube to generate default palette from.

Returns:
Tuple of matplotlib.colors.LinearSegmentedColormap and iris.palette.SymmetricNormalize

↑ top ↑

iris.palette.is_brewer(cmap)

Determine whether the color map is a Cynthia Brewer color map.

Args:

  • cmap:

    The color map instance.

Returns:
Boolean.

↑ top ↑

Provides a symmetric normalization class around a given pivot point.

class iris.palette.SymmetricNormalize(pivot, *args, **kwargs)

Bases: matplotlib.colors.Normalize, object

Provides a symmetric normalization class around a given pivot point.

autoscale(A)

Set vmin, vmax to min, max of A.

autoscale_None(A)

autoscale only None-valued vmin or vmax

inverse(value)
static process_value(value)

Homogenize the input value for easy and efficient normalization.

value can be a scalar or sequence.

Returns result, is_scalar, where result is a masked array matching value. Float dtypes are preserved; integer types with two bytes or smaller are converted to np.float32, and larger types are converted to np.float. Preserving float32 when possible, and using in-place operations, can greatly improve speed for large arrays.

Experimental; we may want to add an option to force the use of float32.

scaled()

return true if vmin and vmax set

vmax
vmin