Skip to content

added None option to _get_view, also fixed a typo #5108

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

Merged
merged 5 commits into from
Oct 2, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed _getview typo
  • Loading branch information
jrmlhermitte committed Sep 20, 2015
commit 0146c5a1ca9eb3e53efec7614c69bad49b785932
4 changes: 2 additions & 2 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3341,8 +3341,8 @@ def _set_view_from_bbox(self, bbox, original_view=None, direction='in',

lastx, lasty, x, y = bbox

if(original_view is None):
original_view = self._getview()
if original_view is None:
original_view = self._get_view()
else:
x0, x1, y0, y1 = original_view
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if original_view is None, then x0, x1, y0, and y1 won't get set here, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Delete the "else:" and dedent the line that follows it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I have just spent the last few hours pouring over the colorbar inverse code so I have my mind in code-reading mode.

Though as I say in my comment below I don't see that this part of the code does actually does anything, it looks dead...


Expand Down