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 between0andself.N. For example,left=2deletes the two first colors.right (
float, optional) – The colormap index for the new “rightmost” color. Must fall between0andself.N. For example,right=4deletes colors after the fourth color.name (
str, optional) – The new colormap name. Default is'_name_copy'.
See also