DiscreteColormap.truncate¶
- DiscreteColormap.truncate(left=None, right=None, name=None)[source]¶
Return a truncated version of the colormap.
- Parameters
left (
float
, optional) – The colormap index for the new “leftmost” color. Must fall between0
andself.N
. For example,left=2
deletes the two first colors.right (
float
, optional) – The colormap index for the new “rightmost” color. Must fall between0
andself.N
. For example,right=4
deletes colors after the fourth color.name (
str
, optional) – The name of the new colormap. Default is'_name_copy'
.
See also