Merge pull request #25479 from greglucas/cmap-bad-name · matplotlib/matplotlib@63c97a2 · GitHub
Skip to content

Commit 63c97a2

Browse files
authored
Merge pull request #25479 from greglucas/cmap-bad-name
FIX: Allow different colormap name from registered name
2 parents 139c045 + cc977dc commit 63c97a2

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

lib/matplotlib/cm.py

Lines changed: 5 additions & 0 deletions

lib/matplotlib/colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def __copy__(self):
774774
return cmapobject
775775

776776
def __eq__(self, other):
777-
if (not isinstance(other, Colormap) or self.name != other.name or
777+
if (not isinstance(other, Colormap) or
778778
self.colorbar_extend != other.colorbar_extend):
779779
return False
780780
# To compare lookup tables the Colormaps have to be initialized

lib/matplotlib/tests/test_colors.py

Lines changed: 14 additions & 2 deletions

0 commit comments

Comments
 (0)