-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fixed ZoomPanBase to work with log plots #4970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
7145eb3
9ed8c7d
485ab2e
abf11f7
e866b74
3e4f696
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3322,7 +3322,7 @@ def _set_view_from_bbox(self, bbox, direction='in', | |
Parameters | ||
---------- | ||
|
||
bbox : 4-tuple or 2 tuple | ||
bbox : 4-tuple or 3 tuple | ||
* If result is a 4 tuple, it is the selected bounding box limits, | ||
in *display* coordinates. | ||
* If result is a 3 tuple, it is an (xp, yp, scl) triple, where | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
|
@@ -3352,7 +3352,6 @@ def _set_view_from_bbox(self, bbox, direction='in', | |
if(len(bbox) == 3): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unnecessary parentheses (plus various cases below.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed. thanks. |
||
# Zooming code | ||
xp, yp, scl = bbox | ||
print("in set view, for zooming with scale {}".format(scl)) | ||
|
||
# Should not happen | ||
if(scl == 0): | ||
|
@@ -3380,6 +3379,11 @@ def _set_view_from_bbox(self, bbox, direction='in', | |
|
||
bbox = [xzc - xwidth/2./scl, yzc - ywidth/2./scl, xzc + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It makes more sense to break after the comma, not the addition. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's a good idea thanks, shouldn't trust my blind vim linewrap :-D |
||
xwidth/2./scl, yzc + ywidth/2./scl] | ||
elif(len(bbox) != 4): | ||
# should be len 3 or 4 but nothing else | ||
print("Warning in _set_view_from_bbox: bounding box is not a | ||
tuple of length 3 or\ 4. Ignoring the view change...\n"); | ||
return | ||
|
||
# Just grab bounding box | ||
lastx, lasty, x, y = bbox | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be
bbox
, notresult
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep thanks for the catch