From c4bfd54a058f9124bfb75beccafdfd03432b3778 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 22 Nov 2024 21:50:55 -0500 Subject: [PATCH] Backport PR #29148: Don't fail on equal-but-differently-named cmaps in qt figureoptions. --- lib/matplotlib/backends/qt_editor/figureoptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/backends/qt_editor/figureoptions.py b/lib/matplotlib/backends/qt_editor/figureoptions.py index c36bbeb62641..3c2eaf1bacd3 100644 --- a/lib/matplotlib/backends/qt_editor/figureoptions.py +++ b/lib/matplotlib/backends/qt_editor/figureoptions.py @@ -149,7 +149,7 @@ def prepare_data(d, init): cmaps = [(cmap, name) for name, cmap in sorted(cm._colormaps.items())] for label, mappable in labeled_mappables: cmap = mappable.get_cmap() - if cmap not in cm._colormaps.values(): + if cmap.name not in cm._colormaps: cmaps = [(cmap, cmap.name), *cmaps] low, high = mappable.get_clim() mappabledata = [