Skip to content

Commit e69d6aa

Browse files
committed
added alias to gray and grey match same colormaps
1 parent a844eca commit e69d6aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/cm.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ def _gen_cmap_registry():
4646
for cmap in list(cmap_d.values()):
4747
rmap = cmap.reversed()
4848
cmap_d[rmap.name] = rmap
49+
50+
# Register colormap aliases for gray and grey.
51+
cmap_d['grey'] = cmap_d['gist_grey'] = cmap_d['gray']
52+
cmap_d['Grays'] = cmap_d['Greys']
53+
cmap_d['gist_yerg'] = cmap_d['gist_yarg'] = cmap_d['gray_r']
54+
cmap_d['grey_r'] = cmap_d['gray_r']
55+
4956
return cmap_d
5057

5158

0 commit comments

Comments
 (0)