Skip to content

Commit 71d4656

Browse files
committed
Don't use deprecated cm.get_cmap in qt figureoptions.
One can directly pass the cmap str name to ScalarMappable.set_cmap.
1 parent b736691 commit 71d4656

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/qt_editor/figureoptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def apply_callback(data):
233233
elif len(mappable_settings) == 4:
234234
label, cmap, low, high = mappable_settings
235235
mappable.set_label(label)
236-
mappable.set_cmap(cm.get_cmap(cmap))
236+
mappable.set_cmap(cmap)
237237
mappable.set_clim(*sorted([low, high]))
238238

239239
# re-generate legend, if checkbox is checked

0 commit comments

Comments
 (0)