LinearSegmentedColormap¶
-
class
LinearSegmentedColormap(*args, alpha=None, cyclic=False, **kwargs)[source]¶ Bases:
matplotlib.colors.LinearSegmentedColormap,proplot.styletools._ColormapNew 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, andextendcan 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
LinearSegmentedColormapfrom a list of colors.punched([cut, name])Return a version of the colormap with the center “punched out”.
reversed([name])Returns a reversed copy of the colormap, as in
LinearSegmentedColormap.save([path])Saves 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])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.