File tree 1 file changed +14
-0
lines changed
lib/matplotlib/backends/qt_editor
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,12 @@ def figure_edit(axes, parent=None):
63
63
('(Re-)Generate automatic legend' , False ),
64
64
]
65
65
66
+ # Save the unit data
67
+ xconverter = axes .xaxis .converter
68
+ yconverter = axes .yaxis .converter
69
+ xunits = axes .xaxis .get_units ()
70
+ yunits = axes .yaxis .get_units ()
71
+
66
72
if has_curve :
67
73
# Get / Curves
68
74
linedict = {}
@@ -122,6 +128,14 @@ def apply_callback(data):
122
128
axes .set_ylim (ymin , ymax )
123
129
axes .set_ylabel (ylabel )
124
130
131
+ # Restore the unit data
132
+ axes .xaxis .converter = xconverter
133
+ axes .yaxis .converter = yconverter
134
+ axes .xaxis .set_units (xunits )
135
+ axes .yaxis .set_units (yunits )
136
+ axes .xaxis ._update_axisinfo ()
137
+ axes .yaxis ._update_axisinfo ()
138
+
125
139
if has_curve :
126
140
# Set / Curves
127
141
for index , curve in enumerate (curves ):
You can’t perform that action at this time.
0 commit comments