Skip to content

Commit

Permalink
Merge pull request matplotlib#29176 from meeseeksmachine/auto-backpor…
Browse files Browse the repository at this point in the history
…t-of-pr-29148-on-v3.9.x

Backport PR matplotlib#29148 on branch v3.9.x (Don't fail on equal-but-differently-named cmaps in qt figureoptions.)
  • Loading branch information
timhoffm authored Nov 24, 2024
2 parents 84f2ae2 + c4bfd54 commit 0586854
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/qt_editor/figureoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 0586854

Please sign in to comment.