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

Skip to content

Commit a8a769d

Browse files
committed
Fix grammar of Vega cmap deprecation message.
Once all the parameters are substituted into the warning message, it doesn't make grammatical sense due to some assumptions in the message.
1 parent c2daee2 commit a8a769d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/_cm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,11 +1384,11 @@ def __getitem__(self, key):
13841384
"Vega20b_r", "Vega20c", "Vega20c_r"]:
13851385
warn_deprecated(
13861386
"2.0",
1387-
name="Vega colormaps",
1388-
alternative="tab",
1387+
name=key,
1388+
alternative="tab" + key[4:],
13891389
obj_type="colormap"
13901390
)
1391-
1391+
13921392
return super(_deprecation_datad, self).__getitem__(key)
13931393

13941394

0 commit comments

Comments
 (0)