File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1080,20 +1080,20 @@ def release_zoom(self, event):
1080
1080
1081
1081
# zoom to rect
1082
1082
lastx , lasty = a .transData .inverse_xy_tup ( (lastx , lasty ) )
1083
- x , y = a .transData .inverse_xy_tup ( (x , y ) )
1083
+ x , y = a .transData .inverse_xy_tup ( (x , y ) )
1084
+ Xmin ,Xmax = a .get_xlim ()
1085
+ Ymin ,Ymax = a .get_ylim ()
1084
1086
1085
- if x < lastx : xmin , xmax = x , lastx
1087
+ if ( x < lastx and Xmin < Xmax ) or ( x > lastx and Xmin > Xmax ) : xmin , xmax = x , lastx
1086
1088
else : xmin , xmax = lastx , x
1087
1089
1088
- if y < lasty : ymin , ymax = y , lasty
1090
+ if ( y < lasty and Ymin < Ymax ) or ( y > lasty and Ymin > Ymax ) : ymin , ymax = y , lasty
1089
1091
else : ymin , ymax = lasty , y
1090
1092
1091
1093
if self ._button_pressed == 1 :
1092
1094
a .set_xlim ((xmin , xmax ))
1093
1095
a .set_ylim ((ymin , ymax ))
1094
1096
elif self ._button_pressed == 3 :
1095
- Xmin ,Xmax = a .get_xlim ()
1096
- Ymin ,Ymax = a .get_ylim ()
1097
1097
if a .get_xscale ()== 'log' :
1098
1098
alpha = log (Xmax / Xmin )/ log (xmax / xmin )
1099
1099
x1 = pow (Xmin / xmin ,alpha )* Xmin
Original file line number Diff line number Diff line change @@ -353,7 +353,7 @@ def set_linewidth(self, w):
353
353
"""
354
354
Set the line width in points
355
355
356
- ACCEPTS: float
356
+ ACCEPTS: float value in points
357
357
"""
358
358
self ._linewidth = w
359
359
@@ -388,7 +388,7 @@ def set_markeredgewidth(self, ew):
388
388
"""
389
389
Set the marker edge width in points
390
390
391
- ACCEPTS: float
391
+ ACCEPTS: float value in points
392
392
"""
393
393
self ._markeredgewidth = ew
394
394
You can’t perform that action at this time.
0 commit comments