8000 updated with alias for reverse spelling · matplotlib/matplotlib@bb0e29b · GitHub
[go: up one dir, main page]

Skip to content

Commit bb0e29b

Browse files
committed
updated with alias for reverse spelling
1 parent aee3fbf commit bb0e29b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/matplotlib/cm.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ def _gen_cmap_registry():
4444
colors.LinearSegmentedColormap.from_list(name, spec, _LUTSIZE))
4545

4646
# Register colormap aliases for gray and grey.
47-
cmap_d["grey"] = cmap_d["gray"]
48-
cmap_d["gist_grey"] = cmap_d["gist_gray"]
49-
cmap_d["Grays"] = cmap_d["Greys"]
47+
cmap_d['grey'] = cmap_d['gray']
48+
cmap_d['gist_grey'] = cmap_d['gist_gray']
49+
cmap_d['gist_yerg'] = cmap_d['gist_yarg']
50+
cmap_d['Grays'] = cmap_d['Greys']
5051

5152
# Generate reversed cmaps.
5253
for cmap in list(cmap_d.values()):
@@ -152,11 +153,6 @@ def register(self, cmap, *, name=None, force=False):
152153
"that was already in the registry.")
153154

154155
self._cmaps[name] = cmap.copy()
155-
# Someone may set the extremes of a builtin colormap and want to register it
156-
# with a different name for future lookups. The object would still have the
157-
# builtin name, so we should update it to the registered name
158-
if self._cmaps[name].name != name:
159-
self._cmaps[name].name = name
160156

161157
def unregister(self, name):
162158
"""

0 commit comments

Comments
 (0)
0