我有一個問題:如何保存Animation.Artist動畫?
我的程序運行良好,但是當我嘗試保存我繪製的動畫時,編譯器響應一個錯誤。
驗證碼:
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import matplotlib.animation as animation
fig=plt.figure()
for infile in glob.glob('*.png'):
img=mpimg.imread(infile)
imgplot=plt.imshow(img)
im_list2.append([imgplot])
ani = animation.ArtistAnimation(fig, im_list2, interval=50, blit=True)
但是當我嘗試將它保存這樣的:
ani.save('Animation1.mp4')
它返回一個錯誤:
WindowsError: [Error 2] The system could not find the given data.
我提供了一個完整的小例子來展示問題,它會更容易回答。 – 2012-02-13 15:22:01
如果你已經找到了你的問題的答案(如你對india_dourada答案的評論中給出的),你應該回答你自己的問題,並將其標記爲已接受。 – bmu 2012-05-17 08:12:18