File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1080,20 +1080,20 @@ def release_zoom(self, event):
10801080
10811081 # zoom to rect
10821082 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 ()
10841086
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
10861088 else : xmin , xmax = lastx , x
10871089
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
10891091 else : ymin , ymax = lasty , y
10901092
10911093 if self ._button_pressed == 1 :
10921094 a .set_xlim ((xmin , xmax ))
10931095 a .set_ylim ((ymin , ymax ))
10941096 elif self ._button_pressed == 3 :
1095- Xmin ,Xmax = a .get_xlim ()
1096- Ymin ,Ymax = a .get_ylim ()
10971097 if a .get_xscale ()== 'log' :
10981098 alpha = log (Xmax / Xmin )/ log (xmax / xmin )
10991099 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):
353353 """
354354Set the line width in points
355355
356- ACCEPTS: float
356+ ACCEPTS: float value in points
357357 """
358358 self ._linewidth = w
359359
@@ -388,7 +388,7 @@ def set_markeredgewidth(self, ew):
388388 """
389389Set the marker edge width in points
390390
391- ACCEPTS: float
391+ ACCEPTS: float value in points
392392"""
393393 self ._markeredgewidth = ew
394394
You can’t perform that action at this time.
0 commit comments