boutproject / xBOUT

Collects BOUT++ data from parallelized simulations into xarray.
https://xbout.readthedocs.io/en/latest/
Apache License 2.0
21 stars 10 forks source link

Animation issues #207

Open ZedThree opened 3 years ago

ZedThree commented 3 years ago

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:

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.