@@ -1193,12 +1193,16 @@ def setLimits(self, xmin, xmax, ymin, ymax, y2min=None, y2max=None):
1193
1193
self .ax .set_xlim (min (xmin , xmax ), max (xmin , xmax ))
1194
1194
1195
1195
if y2min is not None and y2max is not None :
1196
- if not self .isYAxisInverted ():
1196
+ if self .ax2 .get_autoscaley_on ():
1197
+ pass
1198
+ elif not self .isYAxisInverted ():
1197
1199
self .ax2 .set_ylim (min (y2min , y2max ), max (y2min , y2max ))
1198
1200
else :
1199
1201
self .ax2 .set_ylim (max (y2min , y2max ), min (y2min , y2max ))
1200
1202
1201
- if not self .isYAxisInverted ():
1203
+ if self .ax .get_autoscaley_on ():
1204
+ pass
1205
+ elif not self .isYAxisInverted ():
1202
1206
self .ax .set_ylim (min (ymin , ymax ), max (ymin , ymax ))
1203
1207
else :
1204
1208
self .ax .set_ylim (max (ymin , ymax ), min (ymin , ymax ))
@@ -1347,6 +1351,8 @@ def isKeepDataAspectRatio(self):
1347
1351
def setKeepDataAspectRatio (self , flag ):
1348
1352
self .ax .set_aspect (1.0 if flag else "auto" )
1349
1353
self .ax2 .set_aspect (1.0 if flag else "auto" )
1354
+ # self.ax.set_autoscaley_on(flag)
1355
+ # self.ax2.set_autoscaley_on(flag)
1350
1356
1351
1357
def setGraphGrid (self , which ):
1352
1358
self .ax .grid (False , which = "both" ) # Disable all grid first
0 commit comments