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 44a6d28

Browse filesBrowse files
Code review changes
1 parent 9e60e62 commit 44a6d28
Copy full SHA for 44a6d28

File tree

Expand file treeCollapse file tree

2 files changed

+5
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-4
lines changed

‎doc/users/next_whats_new/3d_plot_pan_zoom.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/3d_plot_pan_zoom.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
----------------------------
33

44
The pan and zoom buttons in the toolbar of 3D plots are now enabled.
5-
Deselect both to rotate the plot. When the zoom button is pressed,
5+
Unselect both to rotate the plot. When the zoom button is pressed,
66
zoom in by using the left mouse button to draw a bounding box, and
77
out by using the right mouse button to draw the box. When zooming a
88
3D plot, the current view aspect ratios are kept fixed.

‎lib/mpl_toolkits/mplot3d/axes3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/axes3d.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import matplotlib.transforms as mtransforms
3232
from matplotlib.axes import Axes
3333
from matplotlib.axes._base import _axis_method_wrapper, _process_plot_format
34-
from matplotlib.backend_bases import _Mode
3534
from matplotlib.transforms import Bbox
3635
from matplotlib.tri.triangulation import Triangulation
3736

@@ -1012,7 +1011,9 @@ def _button_press(self, event):
10121011
def _button_release(self, event):
10131012
self.button_pressed = None
10141013
toolbar = getattr(self.figure.canvas, "toolbar")
1015-
if toolbar and toolbar.mode not in (_Mode.PAN, _Mode.ZOOM):
1014+
# backend_bases.release_zoom and backend_bases.release_pan call
1015+
# push_current, so check the navigation mode so we don't call it twice
1016+
if toolbar and self.get_navigate_mode() is None:
10161017
self.figure.canvas.toolbar.push_current()
10171018

10181019
def _get_view(self):
@@ -1162,7 +1163,7 @@ def drag_pan(self, button, key, x, y):
11621163
if du == 0 and dv == 0:
11631164
return
11641165

1165-
# Transform the pan from the view axes to the data axees
1166+
# Transform the pan from the view axes to the data axes
11661167
R = np.array([self._view_u, self._view_v, self._view_w])
11671168
R = -R / self._box_aspect * self._dist
11681169
duvw_projected = R.T @ np.array([du, dv, dw])

0 commit comments

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