GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add pan and zoom toolbar handling to 3D Axes (Replaces PR#22614) by scottshambaugh · Pull Request #23449 · matplotlib/matplotlib

Conversation

@scottshambaugh

@scottshambaugh scottshambaugh commented Jul 19, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

PR Summary

Starting with @greglucas's work in #22614, I got panning and zooming working again with the toolbar buttons. Closes #110 (the oldest open issue!)

Changes in this PR:

  • Pan and zoom buttons enabled for 3D plots
  • Panning 3D plots reworked in general. Previously there was a 'scaling factor' in how much the plot moved with mouse movement. This has been updated so that if you are using an orthographic projection, the point directly under the mouse stays directly under the mouse. (This is not possible with a perspective projection)
  • [bugfix] Panning with a nonzero roll angle was broken, works now.
  • Made panning button configurable, like the zoom and rotate buttons are
  • Added in 'x' and 'y' key locking for 3d plot panning and zooming
  • [bugfix] Fixed mouse zoom jumping if hovering over a separate subplot
  • Refactor calculating the u, v, w view axes, add these as Axes3D private variables ._view_u, ._view_v, ._view_w
  • Privatize and add deprecation warnings for Axes3D .eye, .vvec, .sx, .sy, and proj3d.view_transformation()
  • Tests for panning and zooming

If this is too much packed in a single PR, I can separate it out into the panning and the zooming features.

Zooming behavior:

  • Edit: All axes now zoom equally.
  • With right mouse button: All axes are zoomed equally.
  • With the bounding box and an aspect ratio of 'auto': The scale factors set by the bounding box extents zoom the data axes such that the data is stretched in the u, v plane parallel to the screen but not in the w axis into/out of the screen. In other words, this zooms in 2D, projected onto the 3D data axes. Aspect ratio is set by the aspect of the bounding box. Note that the bounding box scale factors are calculated with respect to the whole canvas rather than the (shrunk) 3D axis limits.
  • With the bounding box and an aspect ratio of 'equal', 'equalzy', 'equalyz', or 'equalxz': Similar to the above, but the constrained data axes are kept equal, which may induce scaling in the w axis. 'equal' zooms all axes equally.

Please play around with it and see if the behavior is as expected!

Here's my test plot code which you can use:

from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
from itertools import product, combinations

fig, ax = plt.subplots(1, 1, subplot_kw={'projection': '3d'})

# Draw rectangular cuboid with side lengths [1, 1, 2]
r = [0, 1]
scale = np.array([1, 1, 2])
for start, end in combinations(np.array(list(product(r, r, r))), 2):
    if np.sum(np.abs(start - end)) == r[1] - r[0]:
        ax.plot3D(*zip(start*scale, end*scale))

ax.view_init(elev=45, azim=45, roll=0)

ax.set_proj_type('ortho')
ax.set_xlabel('x')
ax.set_ylabel('y')
ax.set_zlabel('z')

plt.show(block=True)

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
greglucas and others added 10 commits July 19, 2022 13:40
@greglucas @scottshambaugh
ENH: Add pan and zoom toolbar handling to 3D Axes
d161de3
1) This moves the pan logic that was already in the mouse move handler
into the "drag_pan" method to make it available from the toolbar.

2) This expands upon the panning logic to enable a zoom-to-box feature.
The zoom-to-box is done relative to the Axes, so it shrinks/expands
the box as a fraction of each delta, from lower-left Axes to lower-left
zoom-box. Thus, it tries to handle non-centered zooms, which adds more
cases to handle versus the current right-click zoom only scaling from
the center of the projection.
@scottshambaugh
Rewrite zooming with bounding box
9fd9c66
@scottshambaugh
Rewrite 3d panning to work with a roll angle
4b1d8cf
@scottshambaugh
Whats new for zoom and pan buttons
a6e4651
@scottshambaugh
Make pan button configurable
d7a3d6c
@scottshambaugh
Do not jump when zooming and mouse goes over other subplot
acbec0c
@scottshambaugh
Rework zooming for 3d plots
bb95903
@scottshambaugh
Handle x/y lock when zooming and panning
88d616f
@scottshambaugh
Update tests
5833512
@scottshambaugh
Docstrings
b6fe8b0
scottshambaugh
scottshambaugh commented Jul 19, 2022
View reviewed changes
Comment thread lib/mpl_toolkits/mplot3d/axes3d.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@scottshambaugh
Dont assume a scale_z
8a1e166
@scottshambaugh
scottshambaugh marked this pull request as ready for review July 19, 2022 23:34
scottshambaugh added 2 commits July 19, 2022 18:31
@scottshambaugh
Limit zoom box
8f434d6
@scottshambaugh
Test zoom pan key modifiers
da4fccc
@scottshambaugh
scottshambaugh force-pushed the pan-zoom-3d branch from 0ea88d2 to da4fccc Compare July 20, 2022 02:09
@scottshambaugh
Save some calculation by saving view axes
695fd50
@oscargus oscargus added topic: mplot3d topic: widgets/UI labels Jul 20, 2022
scottshambaugh added 2 commits July 21, 2022 16:39
@scottshambaugh
Deprecation warnings for Axes3D.eye, .vvec
86f4f64
@scottshambaugh
Remove Axes3D._prepare_view_from_bbox for now
47f7000
@scottshambaugh scottshambaugh mentioned this pull request Jul 22, 2022
[Doc]: Create diagram to show rotation directions for 3D plots #21508
Closed
@scottshambaugh
scottshambaugh force-pushed the pan-zoom-3d branch from 026802a to 353d8b8 Compare July 22, 2022 04:26
@scottshambaugh
Comments and docstrings
1eb74b6
@scottshambaugh
scottshambaugh force-pushed the pan-zoom-3d branch from 353d8b8 to 1eb74b6 Compare July 22, 2022 04:34
scottshambaugh
scottshambaugh commented Jul 22, 2022
View reviewed changes
Comment thread lib/mpl_toolkits/mplot3d/proj3d.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@scottshambaugh
Switch from uvn to uvw
4a6020b
@scottshambaugh

scottshambaugh commented Jul 28, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Talked about this in the dev call today, I got a few things to update but this should merge in after #23409 so zooming can respect fixed aspect ratios if those are set.

piiq reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@scottshambaugh
scottshambaugh marked this pull request as draft July 28, 2022 23:07
@greglucas greglucas mentioned this pull request Jul 29, 2022
ENH: Add pan and zoom toolbar handling to 3D Axes #22614
Closed
3 of 4 tasks
@oscargus

oscargus commented Oct 5, 2022

Copy link
Copy Markdown
Member

OK! Maybe it is better to just deprecate the whole proj3d then? Just thinking that there is a single method deprecated now, while it would be just "as easy" to deprecate the whole submodule? (In terms of writing release notes etc.)

That deprecation may naturally be better off in a different PR though. (Sorry, could have thought of that earlier, but didn't realize that proj3d was not really user material.)

Btw, do you know what happens if I squash-merge the commits? Will it still contain both you and @greglucas as authors? (That doesn't happen on Gitlab I've noticed...)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@oscargus

oscargus commented Oct 5, 2022

Copy link
Copy Markdown
Member

I've found some libraries that use proj3d though, e.g.,

  • https://github.com/OpenGenus/cosmos/blob/master/code/artificial_intelligence/src/principal_component_analysis/pca.py
  • https://github.com/ethz-asl/kalibr/blob/master/aslam_offline_calibration/kalibr/python/kalibr_visualize_calibration
  • https://github.com/qutip/qutip/blob/master/qutip/bloch.py
  • https://github.com/ContextLab/hypertools/blob/master/hypertools/plot/draw.py

Most seem to use proj_transform though, so maybe it is enough to keep that?

Which may mean that there is no big deal if one method is deprecated here and some others in another PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

oscargus
oscargus reviewed Oct 5, 2022
View reviewed changes
Comment thread doc/api/next_api_changes/deprecations/23449-SS.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@oscargus

oscargus commented Oct 5, 2022

Copy link
Copy Markdown
Member

Thinking a bit more about it I suggest the following for now:

  • Rewrite the deprecation note to (only) consider the privatized attributes instead.
  • Deprecate suitable parts of proj3d in another PR (which of course you do not have to write). I think those needs another discussion.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@scottshambaugh scottshambaugh mentioned this pull request Oct 5, 2022
[MNT]: Document and deprecate proj3d #24098
Open
@scottshambaugh

scottshambaugh commented Oct 5, 2022

Copy link
Copy Markdown
Contributor Author

Sounds good to me, I undeprecated view_transformation for now, rewrote the API change note, and opened #24098 to track that work forward.

oscargus reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@scottshambaugh

scottshambaugh commented Oct 5, 2022

Copy link
Copy Markdown
Contributor Author

I don't believe that a squash merge would preserve that... I can rebase to just squash all mine if that make sense but might be a few days till I can get back to my personal computer for the CLI.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@scottshambaugh
scottshambaugh force-pushed the pan-zoom-3d branch from 0b58a03 to 7ef2f41 Compare October 6, 2022 01:07
@scottshambaugh
Undeprecate proj3d.view_transformation
a045f36
@scottshambaugh
scottshambaugh force-pushed the pan-zoom-3d branch from 7ef2f41 to a045f36 Compare October 6, 2022 01:13
@scottshambaugh
Undeprecate proj3d.view_transformation
e759fba
oscargus
oscargus reviewed Oct 6, 2022
View reviewed changes
Comment thread doc/api/next_api_changes/deprecations/23449-SS.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

oscargus
oscargus approved these changes Oct 6, 2022
View reviewed changes

@oscargus oscargus left a comment

Copy link
Copy Markdown
Member

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.

Subject to wording in deprecation notice and uncertainty how to deal with the multiple commits, especially the merge commits.

" The only time we are really strict about it is ... to remove upstream merges."

Not sure if it holds here or if the size of this PR means that we can ignore it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

scottshambaugh reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@scottshambaugh @oscargus
Update doc/api/next_api_changes/deprecations/23449-SS.rst
ae8f6a1
Co-authored-by: Oscar Gustafsson <[email protected]>
@scottshambaugh
scottshambaugh force-pushed the pan-zoom-3d branch 3 times, most recently from 56ca03a to ad52d28 Compare October 8, 2022 22:49
@scottshambaugh
Merge branch 'pan-zoom-3d' of github.com:scottshambaugh/matplotlib in…
28fae53
…to pan-zoom-3d
@scottshambaugh
scottshambaugh force-pushed the pan-zoom-3d branch from ad52d28 to 28fae53 Compare October 8, 2022 23:45
@scottshambaugh

scottshambaugh commented Oct 9, 2022

Copy link
Copy Markdown
Contributor Author

Cool, docs are building with that notice now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@timhoffm

timhoffm commented Oct 9, 2022

Copy link
Copy Markdown
Member

I'm not following the squash discussion. Is this only about crediting multiple people in the squash commit? That is done by Co-authored-by lines. Important: This needs two empty lines before. When you squash via the GitHub UI you can edit the commit message. AFAIR the co-author lines are in there by default.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@oscargus
oscargus merged commit 4896ec1 into matplotlib:main Oct 10, 2022
@oscargus

oscargus commented Oct 10, 2022

Copy link
Copy Markdown
Member

Thanks @timhoffm for the clarification/reminder! You are correct that they are there by default, but not two empty in front of it (I added those though, to be on the safe side).

(Context: I did something similar in GitLab and there it wasn't added by default so I had to do a force push on the main branch. DId want to avoid that there...)

timhoffm reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chahak13 pushed a commit to chahak13/matplotlib that referenced this pull request Oct 18, 2022
@scottshambaugh @greglucas
@oscargus @chahak13
Add pan and zoom toolbar handling to 3D Axes (Replaces PR#22614) (mat…
011b1e6
…plotlib#23449)

* ENH: Add pan and zoom toolbar handling to 3D Axes

1) This moves the pan logic that was already in the mouse move handler
into the "drag_pan" method to make it available from the toolbar.

2) This expands upon the panning logic to enable a zoom-to-box feature.
The zoom-to-box is done relative to the Axes, so it shrinks/expands
the box as a fraction of each delta, from lower-left Axes to lower-left
zoom-box. Thus, it tries to handle non-centered zooms, which adds more
cases to handle versus the current right-click zoom only scaling from
the center of the projection.

* Rewrite zooming with bounding box

* Rewrite 3d panning to work with a roll angle

* Whats new for zoom and pan buttons

* Make pan button configurable

* Do not jump when zooming and mouse goes over other subplot

* Rework zooming for 3d plots

* Handle x/y lock when zooming and panning

* Update tests

* Docstrings

* Dont assume a scale_z

* Limit zoom box

* Test zoom pan key modifiers

* Save some calculation by saving view axes

* Deprecation warnings for Axes3D.eye, .vvec

* Remove Axes3D._prepare_view_from_bbox for now

* Comments and docstrings

* Switch from uvn to uvw

* Save aspect to axes

* Constrain zooming with mouse when one of the equal aspect ratios is set

* Cleanup

* Cleanup

* Consolidate finding equal aspect axis indices

* linting

* More intuitive scaling

* Box zoom keeps existing aspect ratios

* Linting

* Code review comments

* Revert parameters for view_transformation

* Fix new 3d pan/zoom view going on view stack twice

* Better clipping

* Test 3d toolbar navigation

* Privatize helper functions

* Deprecations

* Code review changes

* Deprecation note

* Undeprecate proj3d.view_transformation

* Undeprecate proj3d.view_transformation

* Update doc/api/next_api_changes/deprecations/23449-SS.rst


Co-authored-by: Greg Lucas <[email protected]>
Co-authored-by: Scott Shambaugh <[email protected]>
Co-authored-by: Oscar Gustafsson <[email protected]>
pratimugale pushed a commit to pratimugale/matplotlib that referenced this pull request Oct 24, 2022
@scottshambaugh @greglucas
@oscargus @pratimugale
Add pan and zoom toolbar handling to 3D Axes (Replaces PR#22614) (mat…
bf60c44
…plotlib#23449)

* ENH: Add pan and zoom toolbar handling to 3D Axes

1) This moves the pan logic that was already in the mouse move handler
into the "drag_pan" method to make it available from the toolbar.

2) This expands upon the panning logic to enable a zoom-to-box feature.
The zoom-to-box is done relative to the Axes, so it shrinks/expands
the box as a fraction of each delta, from lower-left Axes to lower-left
zoom-box. Thus, it tries to handle non-centered zooms, which adds more
cases to handle versus the current right-click zoom only scaling from
the center of the projection.

* Rewrite zooming with bounding box

* Rewrite 3d panning to work with a roll angle

* Whats new for zoom and pan buttons

* Make pan button configurable

* Do not jump when zooming and mouse goes over other subplot

* Rework zooming for 3d plots

* Handle x/y lock when zooming and panning

* Update tests

* Docstrings

* Dont assume a scale_z

* Limit zoom box

* Test zoom pan key modifiers

* Save some calculation by saving view axes

* Deprecation warnings for Axes3D.eye, .vvec

* Remove Axes3D._prepare_view_from_bbox for now

* Comments and docstrings

* Switch from uvn to uvw

* Save aspect to axes

* Constrain zooming with mouse when one of the equal aspect ratios is set

* Cleanup

* Cleanup

* Consolidate finding equal aspect axis indices

* linting

* More intuitive scaling

* Box zoom keeps existing aspect ratios

* Linting

* Code review comments

* Revert parameters for view_transformation

* Fix new 3d pan/zoom view going on view stack twice

* Better clipping

* Test 3d toolbar navigation

* Privatize helper functions

* Deprecations

* Code review changes

* Deprecation note

* Undeprecate proj3d.view_transformation

* Undeprecate proj3d.view_transformation

* Update doc/api/next_api_changes/deprecations/23449-SS.rst


Co-authored-by: Greg Lucas <[email protected]>
Co-authored-by: Scott Shambaugh <[email protected]>
Co-authored-by: Oscar Gustafsson <[email protected]>
melissawm pushed a commit to melissawm/matplotlib that referenced this pull request Dec 19, 2022
@scottshambaugh @greglucas
@oscargus @melissawm
Add pan and zoom toolbar handling to 3D Axes (Replaces PR#22614) (mat…
2b5df53
…plotlib#23449)

* ENH: Add pan and zoom toolbar handling to 3D Axes

1) This moves the pan logic that was already in the mouse move handler
into the "drag_pan" method to make it available from the toolbar.

2) This expands upon the panning logic to enable a zoom-to-box feature.
The zoom-to-box is done relative to the Axes, so it shrinks/expands
the box as a fraction of each delta, from lower-left Axes to lower-left
zoom-box. Thus, it tries to handle non-centered zooms, which adds more
cases to handle versus the current right-click zoom only scaling from
the center of the projection.

* Rewrite zooming with bounding box

* Rewrite 3d panning to work with a roll angle

* Whats new for zoom and pan buttons

* Make pan button configurable

* Do not jump when zooming and mouse goes over other subplot

* Rework zooming for 3d plots

* Handle x/y lock when zooming and panning

* Update tests

* Docstrings

* Dont assume a scale_z

* Limit zoom box

* Test zoom pan key modifiers

* Save some calculation by saving view axes

* Deprecation warnings for Axes3D.eye, .vvec

* Remove Axes3D._prepare_view_from_bbox for now

* Comments and docstrings

* Switch from uvn to uvw

* Save aspect to axes

* Constrain zooming with mouse when one of the equal aspect ratios is set

* Cleanup

* Cleanup

* Consolidate finding equal aspect axis indices

* linting

* More intuitive scaling

* Box zoom keeps existing aspect ratios

* Linting

* Code review comments

* Revert parameters for view_transformation

* Fix new 3d pan/zoom view going on view stack twice

* Better clipping

* Test 3d toolbar navigation

* Privatize helper functions

* Deprecations

* Code review changes

* Deprecation note

* Undeprecate proj3d.view_transformation

* Undeprecate proj3d.view_transformation

* Update doc/api/next_api_changes/deprecations/23449-SS.rst


Co-authored-by: Greg Lucas <[email protected]>
Co-authored-by: Scott Shambaugh <[email protected]>
Co-authored-by: Oscar Gustafsson <[email protected]>
@oscargus oscargus mentioned this pull request Jan 14, 2023
Deprecate unused/undocumented functions in proj3d #24985
Merged
6 tasks
@scottshambaugh scottshambaugh mentioned this pull request Nov 23, 2025
[ENH]: Adding Zoom Option in Interactive 3D plot #30772
Open
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
@scottshambaugh @greglucas
@oscargus @ImgBotApp
Add pan and zoom toolbar handling to 3D Axes (Replaces PR#22614) (mat…
c577afb
…plotlib#23449)

* ENH: Add pan and zoom toolbar handling to 3D Axes

1) This moves the pan logic that was already in the mouse move handler
into the "drag_pan" method to make it available from the toolbar.

2) This expands upon the panning logic to enable a zoom-to-box feature.
The zoom-to-box is done relative to the Axes, so it shrinks/expands
the box as a fraction of each delta, from lower-left Axes to lower-left
zoom-box. Thus, it tries to handle non-centered zooms, which adds more
cases to handle versus the current right-click zoom only scaling from
the center of the projection.

* Rewrite zooming with bounding box

* Rewrite 3d panning to work with a roll angle

* Whats new for zoom and pan buttons

* Make pan button configurable

* Do not jump when zooming and mouse goes over other subplot

* Rework zooming for 3d plots

* Handle x/y lock when zooming and panning

* Update tests

* Docstrings

* Dont assume a scale_z

* Limit zoom box

* Test zoom pan key modifiers

* Save some calculation by saving view axes

* Deprecation warnings for Axes3D.eye, .vvec

* Remove Axes3D._prepare_view_from_bbox for now

* Comments and docstrings

* Switch from uvn to uvw

* Save aspect to axes

* Constrain zooming with mouse when one of the equal aspect ratios is set

* Cleanup

* Cleanup

* Consolidate finding equal aspect axis indices

* linting

* More intuitive scaling

* Box zoom keeps existing aspect ratios

* Linting

* Code review comments

* Revert parameters for view_transformation

* Fix new 3d pan/zoom view going on view stack twice

* Better clipping

* Test 3d toolbar navigation

* Privatize helper functions

* Deprecations

* Code review changes

* Deprecation note

* Undeprecate proj3d.view_transformation

* Undeprecate proj3d.view_transformation

* Update doc/api/next_api_changes/deprecations/23449-SS.rst


Co-authored-by: Greg Lucas <[email protected]>
Co-authored-by: Scott Shambaugh <[email protected]>
Co-authored-by: Oscar Gustafsson <[email protected]>
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
@scottshambaugh @greglucas
@oscargus @ImgBotApp
Add pan and zoom toolbar handling to 3D Axes (Replaces PR#22614) (mat…
1e3a5f8
…plotlib#23449)

* ENH: Add pan and zoom toolbar handling to 3D Axes

1) This moves the pan logic that was already in the mouse move handler
into the "drag_pan" method to make it available from the toolbar.

2) This expands upon the panning logic to enable a zoom-to-box feature.
The zoom-to-box is done relative to the Axes, so it shrinks/expands
the box as a fraction of each delta, from lower-left Axes to lower-left
zoom-box. Thus, it tries to handle non-centered zooms, which adds more
cases to handle versus the current right-click zoom only scaling from
the center of the projection.

* Rewrite zooming with bounding box

* Rewrite 3d panning to work with a roll angle

* Whats new for zoom and pan buttons

* Make pan button configurable

* Do not jump when zooming and mouse goes over other subplot

* Rework zooming for 3d plots

* Handle x/y lock when zooming and panning

* Update tests

* Docstrings

* Dont assume a scale_z

* Limit zoom box

* Test zoom pan key modifiers

* Save some calculation by saving view axes

* Deprecation warnings for Axes3D.eye, .vvec

* Remove Axes3D._prepare_view_from_bbox for now

* Comments and docstrings

* Switch from uvn to uvw

* Save aspect to axes

* Constrain zooming with mouse when one of the equal aspect ratios is set

* Cleanup

* Cleanup

* Consolidate finding equal aspect axis indices

* linting

* More intuitive scaling

* Box zoom keeps existing aspect ratios

* Linting

* Code review comments

* Revert parameters for view_transformation

* Fix new 3d pan/zoom view going on view stack twice

* Better clipping

* Test 3d toolbar navigation

* Privatize helper functions

* Deprecations

* Code review changes

* Deprecation note

* Undeprecate proj3d.view_transformation

* Undeprecate proj3d.view_transformation

* Update doc/api/next_api_changes/deprecations/23449-SS.rst


Co-authored-by: Greg Lucas <[email protected]>
Co-authored-by: Scott Shambaugh <[email protected]>
Co-authored-by: Oscar Gustafsson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@QuLogic QuLogic QuLogic left review comments
@oscargus oscargus oscargus approved these changes
@greglucas greglucas greglucas approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

topic: mplot3d topic: widgets/UI

Projects

None yet

Milestone

v3.7.0

Development

Successfully merging this pull request may close these issues.

pan and zoom are broken for mplot3d

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@scottshambaugh @oscargus @timhoffm @QuLogic @greglucas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.