RuntimeError: The animation function must return a sequence of Artist objects.
조회수 1246회
def animate(i):
"""The main animation function, called for each frame."""
def animate_particle(X, ln, i):
"""Plot the trajectory of a particle up to step i."""
ln.set_data(X[:i,0], X[:i,1])
ln.set_3d_properties(X[:i,2])
particles._offsets3d = np.vstack((Xe[i][:3], Xi[i][:3])).T
animate_particle(Xe, lne, i)
animate_particle(Xi, lni, i)
fig, ax, lne, lni, particles = init()
ani = animation.FuncAnimation(fig, animate, init_func=init, frames=5000, interval=1000, blit=True)
HTML(ani.to_html5_video())
rc('animation', html='html5')
ani
plt.show()
아마 animate 함수에 return을 추가하지 않아서 돌아가지 않는것 같습니다... 어떻게 return을 추가해야할지 감이 안옵니다.
-
(•́ ✖ •̀)
알 수 없는 사용자 - 〉
댓글 입력