sme_contrib.plot.colormap

sme_contrib.plot.colormap(color, name='my colormap')

Create a linear matplotlib colormap

The minimum value corresponds to the color black, and the maximum value corresponds to the supplied color.

This color can be supplied as a triplet of floats in the range from zero to one, or as a hex RGB string "#rgb or "#rrggbb.

So for example, three equivalent ways to set the color to red would be (1.0, 0.0, 0.0), #f00, or "#ff0000".

Parameters

color – RBG triplet of floats between 0 and 1, or hex RGB string

Returns

the Colormap

Return type

matplotlib.Colormap