-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Add washing machine to Axes3D #19937
Conversation
Hi, any chance you can convert the movie into a gif that you can then post here? At least on my phone, the link redirects to a download. |
cfbcdfa
to
32e0d3d
Compare
Thanks, @timhoffm .
In the push I just made, I've switched to using a sin-cos combo which I think produces a nicer view.
I've seen that; thank you for providing an example. The downside to relying solely on the existing animation framework is that you have to either have an example bookmarked or type everything out each time you need this. Having it built in means I can create 3d plots for quick analysis without having to think too much about this aspect of visualization. Later, if I wanted something smoother or reproducible, I would build an animation. So I think there are distinct use cases here. |
We could certainly come up with an API that does not need much typing, e.g. Or with more degrees of freedom: |
But, if I understand correctly, the animation approach you propose would run continuously in a way that would prevent or interfere with a user doing custom zooms, rotations, or freezes? |
@timhoffm Side point: I can't repro the gif clipping failure, but do you want to open a separate issue for that? |
👍 This is a cool idea! |
32e0d3d
to
b46a680
Compare
I've moved the rotation keys to "z" and "x". "z" does a washing machine and "x" performs a continuous azimuthal rotation. |
@r-barnes We discussed this one on the dev call this week. For now, we think this would be best as a third-party package. We are updating our third party package page, but in the meantime you would be welcome to link you package on our third-party page. Thanks for the cool idea! |
BTW the third-party page is https://github.com/matplotlib/mpl-third-party. Thanks for the interesting idea! |
PR Summary
Seeing the structure of 3D plots can be challenging if the plots are stationary. This PR adds a "washing machine" perturbation that gently and continuously moves the 3D axes to help reveal the 3d structure of the data.
A movie of this in action is here (pause the video to see the difficulty of interpreting the data sans the animation) and a gif is here.
The animation is toggled by pressing the "z" key.
This PR doesn't (yet!) include all the features of a good PR as I expect there might be some discussion regarding how best to execute this feature.
Note that the motion could also be made smoother and I haven't figured out how to pin the motion to, say, the back corner of the axes, which might provide better depth cues than the current motion which, I think, is pinned more to the center of the axes cube.
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).