DiscreteColormap¶
- class DiscreteColormap(colors, name=None, N=None, alpha=None, **kwargs)[source]¶
Bases:
matplotlib.colors.ListedColormap
,proplot.colors._Colormap
Replacement for
ListedColormap
.- Parameters
alpha (
float
, optional) – The opacity for the entire colormap. Overrides the input colors.- Other Parameters
*args, **kwargs – Passed to
ListedColormap
.
Methods Summary
append
(*args[, name, N])Append arbitrary colormaps onto this colormap.
copy
([colors, name, N, alpha])Return a new colormap with relevant properties copied from this one if they were not provided as keyword arguments.
from_file
(path, *[, warn_on_failure])Load color cycle from a file.
save
([path, alpha])Save the colormap data to a file.
set_alpha
(alpha)Set the opacity for the entire colormap.
shifted
([shift, name])Return a cyclically shifted version of the colormap.
truncate
([left, right, name])Return a truncated version of the colormap.