Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 002ebca

Browse filesBrowse files
committed
mistake in the logic for checking for original view
1 parent 0146c5a commit 002ebca
Copy full SHA for 002ebca

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3318,7 +3318,7 @@ def _set_view_from_bbox(self, bbox, original_view=None, direction='in',
33183318
33193319
original_view : any
33203320
A view saved from before initiating the selection, the result of
3321-
calling :meth:`_get_view`. If set to none, _get_view will be called
3321+
calling :meth:`_get_view`. If set to None, _get_view will be called
33223322
to obtain current view state.
33233323
33243324
direction : str
@@ -3341,18 +3341,18 @@ def _set_view_from_bbox(self, bbox, original_view=None, direction='in',
33413341

33423342
lastx, lasty, x, y = bbox
33433343

3344-
if original_view is None:
3345-
original_view = self._get_view()
3346-
else:
3347-
x0, x1, y0, y1 = original_view
3348-
33493344
# zoom to rect
33503345
inverse = self.transData.inverted()
33513346
lastx, lasty = inverse.transform_point((lastx, lasty))
33523347
x, y = inverse.transform_point((x, y))
33533348
Xmin, Xmax = self.get_xlim()
33543349
Ymin, Ymax = self.get_ylim()
33553350

3351+
if original_view is not None:
3352+
x0, x1, y0, y1 = original_view
3353+
else:
3354+
x0, x1, y0, y1 = Xmin, Xmax, Ymin, Ymax
3355+
33563356
if twinx:
33573357
x0, x1 = Xmin, Xmax
33583358
else:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.