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
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 1 addition & 7 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3300,7 +3300,7 @@ def _set_view(self, view):
self.set_xlim((xmin, xmax))
self.set_ylim((ymin, ymax))

def _set_view_from_bbox(self, bbox, original_view, direction='in',
def _set_view_from_bbox(self, bbox, direction='in',
mode=None, twinx=False, twiny=False):
"""
Update view from a selection bbox.
Expand All @@ -3316,10 +3316,6 @@ def _set_view_from_bbox(self, bbox, original_view, direction='in',
bbox : tuple
The selected bounding box limits, in *display* coordinates.

original_view : any
A view saved from before initiating the selection, the result of
calling :meth:`_get_view`.

direction : str
The direction to apply the bounding box.
* `'in'` - The bounding box describes the view directly, i.e.,
Expand All @@ -3340,8 +3336,6 @@ def _set_view_from_bbox(self, bbox, original_view, direction='in',

lastx, lasty, x, y = bbox

x0, y0, x1, y1 = original_view

# zoom to rect
inverse = self.transData.inverted()
lastx, lasty = inverse.transform_point((lastx, lasty))
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -3074,7 +3074,7 @@ def release_zoom(self, event):
else:
continue

a._set_view_from_bbox((lastx, lasty, x, y), view, direction,
a._set_view_from_bbox((lastx, lasty, x, y), direction,
self._zoom_mode, twinx, twiny)

self.draw()
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backend_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ def _release(self, event):
else:
continue

a._set_view_from_bbox((lastx, lasty, x, y), view, direction,
a._set_view_from_bbox((lastx, lasty, x, y), direction,
self._zoom_mode, twinx, twiny)

self._zoom_mode = None
Expand Down