Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b8bdcf8

Browse files
tacaswelltimhoffm
andauthored
DOC: fix formatting and wording
Co-authored-by: Tim Hoffmann <[email protected]>
1 parent 3f99c20 commit b8bdcf8

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/matplotlib/cm.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,17 +189,15 @@ def unregister(self, name):
189189

190190
def get_cmap(self, cmap):
191191
"""
192-
Ensure that at given object is a converted to a color map.
193-
194-
If *cmap* in `None`, returns the Colormap named by :rc:`image.cmap`.
192+
Return a color map specified through *cmap*.
195193
196194
Parameters
197195
----------
198-
cmap : str, Colormap, None
196+
cmap : str or `~matplotlib.colors.Colormap` or None
199197
200-
- if a `~matplotlib.colors.Colormap`, return it
201-
- if a string, look it up in mpl.colormaps
202-
- if None, look up the default color map in mpl.colormaps
198+
- if a `.Colormap`, return it
199+
- if a string, look it up in ``mpl.colormaps``
200+
- if None, return the Colormap defined in :rc:`image.cmap`
203201
204202
Returns
205203
-------

0 commit comments

Comments
 (0)