0

I have a piece of code that creates four animations from data, but only one (the first one to be saved) is actually saved.

the relevant part of my code:

`anim1 = FuncAnimation(fig, update1, interval=50) #creates the animations
anim2 = FuncAnimation(fig, update2, interval=50)
diff_anim1 = FuncAnimation(fig, update3, interval=50)
diff_anim2 = FuncAnimation(fig, update4, interval=50)

anim1.save("phi.mp4") #saves animations 
anim2.save("chi.mp4")
diff_anim1.save("phi_diff.mp4")
diff_anim2.save("chi_diff.mp4")`

I know the animation is being created, because when I comment out the anim1.save line, the second animation saves just fine. The animations look just like I would expect, but I cannot figure out a way to have them all save at once. It is somewhat computationally wasteful because my animations are made up of somewhat large scatter plots.

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158

0 Answers0