ListedColormap.truncated¶
-
ListedColormap.
truncated
(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 between
0
andself.N
. For example,left=2
deletes the two first colors.right (float, optional) – The colormap index for the new “rightmost” color. Must fall between
0
andself.N
. For example,right=4
deletes colors after the fourth color.name (str, optional) – The new colormap name. Default is
self.name + '_truncated'
.