Skip to content
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

Animation issues #207

Open
ZedThree opened this issue Aug 20, 2021 · 0 comments
Open

Animation issues #207

ZedThree opened this issue Aug 20, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@ZedThree
Copy link
Member

Animations are a little tricky to use at the minute. I'm just dumping some info here, I'll try and fix some of these myself next week.

I get this warning a lot: /home/peter/.local/lib/python3.9/site-packages/matplotlib/animation.py:973: UserWarning: Animation was deleted without rendering anything. This is most likely unintended. To prevent deletion, assign the Animation to a variable that exists for as long as you need the Animation.
I'm pretty sure this is basically just a UX bug in matplotlib, but there's some gotchas:

  • if you see this warning because you haven't assigned the result of df.bout.animate* to a variable, it seems impossible to get rid of it without recreating the dataset, e.g. df = df.squeeze()
  • if you try to recreate an animation and assign it to an existing variable, you can still get the warning. You'll need to del anim to get it to work again

A suggested fix/workaround from the matplotlib github is to append new animations to a global list.


animate1D silently fails if the dataset isn't 1D+time, while animate2D fails if it isn't 2D+time. animate2D has x and y arguments, so it should only fail if they aren't specified and the data has the wrong number of dimensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant