Fix cmap deprecations by QuLogic · Pull Request #23710 · matplotlib/matplotlib · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/api/next_api_changes/behavior/23710-ES.rst
7 changes: 4 additions & 3 deletions lib/matplotlib/cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def unregister(self, name):
@_api.deprecated(
'3.6',
pending=True,
alternative="``matplotlib.colormaps.register_cmap(name)``"
alternative="``matplotlib.colormaps.register(name)``"
)
def register_cmap(name=None, cmap=None, *, override_builtin=False):
"""
Expand Down Expand Up @@ -280,14 +280,15 @@ def _get_cmap(name=None, lut=None):
# do it in two steps like this so we can have an un-deprecated version in
# pyplot.
get_cmap = _api.deprecated(
'3.6', pending=True, alternative="``matplotlib.colormaps[name]``"
'3.6',
name='get_cmap', pending=True, alternative="``matplotlib.colormaps[name]``"
)(_get_cmap)


@_api.deprecated(
'3.6',
pending=True,
alternative="``matplotlib.colormaps.unregister_cmap(name)``"
alternative="``matplotlib.colormaps.unregister(name)``"
)
def unregister_cmap(name):
"""
Expand Down
10 changes: 5 additions & 5 deletions lib/matplotlib/tests/test_colors.py