You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
df.bout.animate*
to a variable, it seems impossible to get rid of it without recreating the dataset, e.g.df = df.squeeze()
del anim
to get it to work againA 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, whileanimate2D
fails if it isn't 2D+time.animate2D
hasx
andy
arguments, so it should only fail if they aren't specified and the data has the wrong number of dimensions.The text was updated successfully, but these errors were encountered: