Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f5b9b11

Browse filesBrowse files
committed
Image interpolation selector in Qt figure options.
Test with `imshow(np.random.rand(10))` then click on the figure options button (Qt only).
1 parent 9f0d770 commit f5b9b11
Copy full SHA for f5b9b11

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed

‎lib/matplotlib/backends/qt_editor/figureoptions.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/qt_editor/figureoptions.py
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ def prepare_data(d, init):
157157
('Label', label),
158158
('Colormap', [cmap.name] + cmaps),
159159
('Min. value', low),
160-
('Max. value', high)]
160+
('Max. value', high),
161+
('Interpolation',
162+
[image.get_interpolation()]
163+
+ [(name, name) for name in sorted(image.iterpnames)])]
161164
images.append([imagedata, label, ""])
162165
# Is there an image displayed?
163166
has_image = bool(images)
@@ -220,10 +223,11 @@ def apply_callback(data):
220223
# Set / Images
221224
for index, image_settings in enumerate(images):
222225
image = imagedict[imagelabels[index]]
223-
label, cmap, low, high = image_settings
226+
label, cmap, low, high, interpolation = image_settings
224227
image.set_label(label)
225228
image.set_cmap(cm.get_cmap(cmap))
226229
image.set_clim(*sorted([low, high]))
230+
image.set_interpolation(interpolation)
227231

228232
# re-generate legend, if checkbox is checked
229233
if generate_legend:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.