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