LinearSegmentedColormap

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

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

New base class for all LinearSegmentedColormaps.

Parameters
  • 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, N])

Return the concatenation of this colormap with the input colormaps.

from_file(path[, warn_on_failure])

Load colormap from a file.

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”.

reversed([name])

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

save([path])

Save the colormap data to a file.

set_alpha(alpha)

Set the opacity for the entire colormap.

set_cyclic(b)

Set whether this colormap is “cyclic”.

shifted([shift, name])

Return a cyclicaly shifted version of the colormap.

truncated([left, right, name])

Return a truncated version of the colormap.

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

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