File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
lib/matplotlib/backends/qt_editor Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ def convert_limits(lim, converter):
4040 return map (float , lim )
4141
4242 axis_map = axes ._axis_map
43+ axis_converter = {
44+ name : axis .converter
45+ for name , axis in axis_map .items ()
46+ }
4347 axis_limits = {
4448 name : tuple (convert_limits (
4549 getattr (axes , f'get_{ name } lim' )(), axis .converter
@@ -197,7 +201,7 @@ def apply_callback(data):
197201
198202 getattr (axes , f"set_{ name } lim" )(axis_min , axis_max )
199203 axis .set_label_text (axis_label )
200- setattr ( axis , 'converter' , axis .converter )
204+ axis .converter = axis_converter [ name ]
201205 axis .set_units (axis_units [name ])
202206 axis ._update_axisinfo ()
203207
@@ -246,7 +250,7 @@ def apply_callback(data):
246250 # Redraw
247251 figure = axes .get_figure ()
248252 figure .canvas .draw ()
249- for name in axis_map . keys () :
253+ for name in axis_map :
250254 if getattr (axes , f"get_{ name } lim" )() != orig_limits [name ]:
251255 figure .canvas .toolbar .push_current ()
252256 break
You can’t perform that action at this time.
0 commit comments