LinearSegmentedColormap.punched¶
-
LinearSegmentedColormap.
punched
(cut=None, name=None, **kwargs)[source]¶ Return a version of the colormap with the center “punched out”. This is great for making the transition from “negative” to “positive” in a diverging colormap more distinct.
- Parameters
cut (float, optional) – The proportion to cut from the center of the colormap. For example,
center=0.1
cuts the central 10%%.name (str, optional) – The name of the new colormap. Default is
self.name + '_punched'
.**kwargs – Passed to
LinearSegmentedColormap.updated
orPerceptuallyUniformColormap.updated
.
- Returns
LinearSegmentedColormap
– The colormap.