matplotlib


Travis-CI:

This Page

matplotlib.colors.Colormap

class matplotlib.colors.Colormap(name, N=256)

Baseclass for all scalar to RGBA mappings.

Typically Colormap instances are used to convert data values (floats) from the interval [0, 1] to the RGBA color that the respective Colormap represents. For scaling of data into the [0, 1] interval see matplotlib.colors.Normalize. It is worth noting that matplotlib.cm.ScalarMappable subclasses make heavy use of this data->normalize->map-to-color processing chain.

Parameters:

name : str

The name of the colormap.

N : int

The number of rgb quantization levels.