MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / set_cmap

Function set_cmap

site-packages/matplotlib/pyplot.py:2130–2147  ·  view source on GitHub ↗

Set the default colormap. Applies to the current image if any. See help(colormaps) for more information. *cmap* must be a :class:`~matplotlib.colors.Colormap` instance, or the name of a registered colormap. See :func:`matplotlib.cm.register_cmap` and :func:`matplotlib.cm.

(cmap)

Source from the content-addressed store, hash-verified

2128
2129
2130def set_cmap(cmap):
2131 """
2132 Set the default colormap. Applies to the current image if any.
2133 See help(colormaps) for more information.
2134
2135 *cmap* must be a :class:`~matplotlib.colors.Colormap` instance, or
2136 the name of a registered colormap.
2137
2138 See :func:`matplotlib.cm.register_cmap` and
2139 :func:`matplotlib.cm.get_cmap`.
2140 """
2141 cmap = cm.get_cmap(cmap)
2142
2143 rc('image', cmap=cmap.name)
2144 im = gci()
2145
2146 if im is not None:
2147 im.set_cmap(cmap)
2148
2149
2150@docstring.copy_dedent(matplotlib.image.imread)

Callers 15

autumnFunction · 0.85
boneFunction · 0.85
coolFunction · 0.85
copperFunction · 0.85
flagFunction · 0.85
grayFunction · 0.85
hotFunction · 0.85
hsvFunction · 0.85
jetFunction · 0.85
pinkFunction · 0.85
prismFunction · 0.85
springFunction · 0.85

Calls 4

gciFunction · 0.85
get_cmapMethod · 0.80
rcFunction · 0.70
set_cmapMethod · 0.45

Tested by

no test coverage detected