class LinearSegmentedColormap(*args, alpha=None, cyclic=False, **kwargs)[source]

Bases: matplotlib.colors.LinearSegmentedColormap, proplot.styletools._Colormap

New base class for all LinearSegmentedColormaps.

  • cyclic (bool, optional) – Whether the colormap is cyclic. If True, this changes how the leftmost and rightmost color levels are selected, and extend can only be 'neither' (a warning will be issued otherwise).

  • alpha (float, optional) – The opacity for the entire colormap. Overrides the input segment data.

  • *args, **kwargs – Passed to LinearSegmentedColormap.

Methods Summary

concatenate(*args[, ratios, name])

Appends arbitrary colormaps onto this one.

from_list(name, colors[, ratios])

Make a LinearSegmentedColormap from a list of colors.

punched([cut, name])

Return a version of the colormap with the center “punched out”.


Returns a reversed copy of the colormap, as in LinearSegmentedColormap.


Saves the colormap data to a file.


Set the opacity for the entire colormap.


Set whether this colormap is “cyclic”.

shifted([shift, name])

Return a cyclicaly shifted version of the colormap.

truncated([left, right, name])

Returns a truncated version of the colormap.

updated([name, segmentdata, N, alpha, …])

Returns a new colormap, with relevant properties copied from this one if they were not provided as keyword arguments.