-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Doc]: add animation examples to show animated subplots #23909
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
Comments
I'll agree that the example was overly complicated, but I don't think anything has changed in regards to animating. They are, and have always been, just another |
That example was removed in #10125 and also yes I saw code and didn't read carefully that actual mechanisms didn't change 😖 sorry! so currently the only examples in the gallery are the single axes case. I think it's one of those things that's obvious if you've got a good intuition for the library and not so much if you don't. I got a DM asking about how to animate subplots - sent them to the usage guide and discourse - and it seemed like a useful thing to include to show the intuition. |
No worries, I think having an example that shows how to properly manage artists across different |
I think a projection of a circular motion would be a nice example. Similar to https://www.youtube.com/watch?v=cx-qHZwsLqs Left ax: circle with a rotating point and a line from that point vertically to the x axis(= the y component) Right ax: y(r) = sin(r), and a vertical line moving along r. One should see that both vertical lines always have the same height. |
Great! I wasn't sure how difficult the connection line between the two Axes was, and thus proposed the vertical lines, but this is even bette. |
Documentation Link
https://matplotlib.org/devdocs/gallery/animation/index.html
Problem
Figured it'd be useful to have at least one example in the docs to show that it's possible and encourage the use of the OO paradigm. There used to be a subplot example, but
that was back when it was overly complicated to do animated subplots.it was removed in #10125Suggested improvement
Add a new example showing how animation on subplots work. I originally thought of merging existing examples but they all feel overly complicated so I think this should be super simple, like 3 plots: sine/cosine/tangent and two lines each in the style of https://matplotlib.org/devdocs/gallery/animation/simple_anim.html#sphx-glr-gallery-animation-simple-anim-py
I was thinking something like this, but if there's an easier or alternative, we should probably show that (too/instead of):
The text was updated successfully, but these errors were encountered: