- classmethod ContinuousColormap.from_list(*args, **kwargs)¶
ContinuousColormapfrom a sequence of colors.
If a sequence of (float, color-spec) tuples, the float values are the coordinate of each transition and must range from 0 to 1. This can be used to divide the colormap range unevenly.
str, optional) – The colormap name. This can also be passed as the first positional string argument. Default is
ratios (sequence of
float, optional) – Relative extents of each color transition. Must have length
len(colors) - 1. Larger numbers indicate a slower transition, smaller numbers indicate a faster transition. For example,
('red', 'blue', 'green')with
ratios=(2, 1)creates a colormap with the transition from red to blue taking twice as long as the transition from blue to green.
- Other Parameters
**kwargs – Passed to
ContinuousColormap– The colormap.