From d515b1020067bd40edd8f977842582f06c5f05d9 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 7 Feb 2022 21:52:30 -0500 Subject: [PATCH] Backport PR #22396: Clarify note in get_cmap() --- lib/matplotlib/cm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/cm.py b/lib/matplotlib/cm.py index a1f15ee3b5a1..4bc1e8b05d33 100644 --- a/lib/matplotlib/cm.py +++ b/lib/matplotlib/cm.py @@ -265,9 +265,9 @@ def get_cmap(name=None, lut=None): Notes ----- - Currently, this returns the global colormap object, which is deprecated. - In Matplotlib 3.5, you will no longer be able to modify the global - colormaps in-place. + Currently, this returns the global colormap object. This is undesired + because users could accidentally modify the global colormap. + From Matplotlib 3.6 on, this will return a copy instead. Parameters ----------