-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
Summary: matplotlib 1.5 only saving 1 frame of animation, 1.4.3 saves all frames
I have code that reads like this (link to full code below):
anim = animation.FuncAnimation(fig, bar_animate,
frames=100, interval=75)
anim.save('02_no_info.gif', writer='imagemagick')
This has always worked for me until I reran it a few days ago. Now only saves the first frame of the animations. I put prints in the bar_animate function, and it is being called 100 times. I stepped into the save routine: it builds a list generator - when I expand it out it contains only (1,), so only one frame gets saved. I didn't dig deep enough to figure out why that tuple was generated.
My environment is Anaconda 64-bit, Windows 7, Python 3.5.1, IPython 4.0.1, matplotlib 1.5.
If I downgrade matplotlib to 1.4.3 then the save works - all 100 frames are saved to the gif. If I then upgrade, only 1 frame is saved. I did this cycle a couple of times to verify that this is the only difference. The directories for both have a valid matplotlibrc as far as I can tell - I edited them to use imagemagick, and put the full path to imagemagick in, as required for windows.
The code that evokes this behavior lives here:
https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/animations/discrete_bayes_animations.ipynb
I'm a programmer, so if you can't reproduce this and need help tracking the bug down let me know.