lookuptable

MapperMixin.lookuptable(range=None, gradient=None, logscale=None, size=None, **kwargs)[source]

Modify lookup table properties.

An objects’ lookup tables determines how entries of the scalar array are translated to color values. Smooth color gradients are defined by the color schemes ‘hot’, ‘cool’, ‘jet’, and ‘grey’. The color schemes ‘spectral’, ‘diverging’, ‘blue’, ‘orange’, and ‘purple’ define a discrete color series.

Parameters:
  • range ((float, float)) – Accpeted range of scalar values, default [0, 1].

  • gradient (str) – Color scheme identifier.

  • logscale (bool) – Switch between linear and logarithmic scale.

  • size (int) – Size of lookup table.

Note

Lookup tables have no effect when directly mapping RGB color values.

If the corresponding keyword arguments are provied, out of range values are marked with the below, above, and nan colors. Note that those colors also have an alpha value to control opacity.

Keyword Arguments:
  • below (array_like, shape (4, )) – Color for scalars below range.

  • above (array_like, shape (4, )) – Color for scalars above range.

  • nan (array_like, shape (4, )) – Special color for NaN scalar values.

Note

Any arguments not provided have no affect on the corresponding lookup table property.