-
Notifications
You must be signed in to change notification settings - Fork 20
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
save_animation on 2 axis simultaneously #188
Comments
Going back to the primary function
|
Hi @patquem I saw your question on discourse as well so linking that here: https://discourse.matplotlib.org/t/mpl-interactions-save-animation-on-2-axis-simultaneously/22077/ The relevant section of the docs is https://mpl-interactions.readthedocs.io/en/stable/examples/Usage-Guide.html#Only-Using-some-of-the-parameters-+-specifying-axes In your case you need to do: controls = iplt.imshow(ampli2d, k=k, ax=ax1)
_ = iplt.imshow(phase2d, ax=ax2, controls=controls) # <- THIS IS THE IMPORTANT CHANGE
anim = controls.save_animation(“plot-2.gif”, fig, “k”, interval=35, N_frames=100) |
Hi @ianhi , |
I'm sorry the docs weren't more clear! I think they definitely could be improved to make stuff like this easier to find. If you have any suggestions on what would have made this easier for you to find this feel free to let me know :) |
Don't apologize. |
One other thing to note here is that it looks like you're mostly using mpl-interactions to index through a pre made array right? There are two easy ways to do that that don't involve a function: Use the
|
Hello,
How to create a gif animation of 2 subplots iterating simultaneously ?
Is there a way to have a 'global' controler for both axis ?
(in the example below, only the first axis iterates due to save_animation linked to the 1rst axis controler).
Any idea ?
Thanks.
Patrick
The text was updated successfully, but these errors were encountered: