用已知的时间段的matplotlib对预定义的列表进行动画列表
我生成了两个位置列表(X和Y坐标)。 现在,我想在元素之后对动作(更改x和y)元素进行动画动画。
Matplotlib的Funcanimation功能似乎不起作用。动画(i)函数通常使用x和y的时间依赖性更改;因此,i的功能。但是我知道时间步,我不想在动画函数中实现此依赖关系。
因此,想象一下列表:
- x = [2,5,1,5,2,8,5,8]
- y = [5,3,7,2,0,5,9,3]
,已知的时间段
- DT = 0.1 #秒
我如何对此进行动画?提前致谢!
I generated two location lists (x and y coordinates).
Now I want to animate the movement(changing x and y) element after element.
The FuncAnimation function of matplotlib seems not to work. The animate(i) function usually uses the timedependent changes of x and y; so a function of i. But I know the timestep and I don't want to implement this dependency in the animate function.
So imagine the lists:
- x = [2,5,1,5,2,8,5,8]
- y = [5,3,7,2,0,5,9,3]
with a known timestep
- dt = 0.1 #seconds
How can I animate this? Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论