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

Skip to content

Commit 214def5

Browse files
authored
Merge pull request #19766 from QuLogic/extend-cmap-deprecation
Set colormap modification removal to 3.6.
2 parents 1937d0b + c86f15d commit 214def5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/matplotlib/colors.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,10 +557,12 @@ def _warn_if_global_cmap_modified(cmap):
557557
if getattr(cmap, '_global', False):
558558
_api.warn_deprecated(
559559
"3.3",
560+
removal="3.6",
560561
message="You are modifying the state of a globally registered "
561-
"colormap. In future versions, you will not be able to "
562-
"modify a registered colormap in-place. To remove this "
563-
"warning, you can make a copy of the colormap first. "
562+
"colormap. This has been deprecated since %(since)s and "
563+
"%(removal)s, you will not be able to modify a "
564+
"registered colormap in-place. To remove this warning, "
565+
"you can make a copy of the colormap first. "
564566
f'cmap = mpl.cm.get_cmap("{cmap.name}").copy()'
565567
)
566568

0 commit comments

Comments
 (0)