Skip to content

Commit 2a1da87

Browse files
committed
Document that get_cmap returns a copy now
This was put into effect in #22298, but was not given an API note.
1 parent f2ca9f9 commit 2a1da87

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
``plt.get_cmap`` and ``matplotlib.cm.get_cmap`` return a copy
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
Formerly, `~.pyplot.get_cmap` and `.cm.get_cmap` returned a global version of a
5+
`.Colormap`. This was prone to errors as modification of the colormap would
6+
propagate from one location to another without warning. Now, a new copy of the
7+
colormap is returned.

0 commit comments

Comments
 (0)