我有一个问题:如何保存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