File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
lib/matplotlib/backends/qt_editor Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -139,10 +139,12 @@ def prepare_data(d, init):
139
139
cmap = image .get_cmap ()
140
140
if cmap not in cm .cmap_d .values ():
141
141
cmaps = [(cmap , cmap .name )] + cmaps
142
+ low , high = image .get_clim ()
142
143
imagedata = [
143
144
('Label' , label ),
144
- ('Colormap' , [cmap .name ] + cmaps )
145
- ]
145
+ ('Colormap' , [cmap .name ] + cmaps ),
146
+ ('Min. value' , low ),
147
+ ('Max. value' , high )]
146
148
images .append ([imagedata , label , "" ])
147
149
# Is there an image displayed?
148
150
has_image = bool (images )
@@ -203,9 +205,10 @@ def apply_callback(data):
203
205
# Set / Images
204
206
for index , image_settings in enumerate (images ):
205
207
image = imagedict [imagelabels [index ]]
206
- label , cmap = image_settings
208
+ label , cmap , low , high = image_settings
207
209
image .set_label (label )
208
210
image .set_cmap (cm .get_cmap (cmap ))
211
+ image .set_clim (* sorted ([low , high ]))
209
212
210
213
# re-generate legend, if checkbox is checked
211
214
if generate_legend :
You can’t perform that action at this time.
0 commit comments