matplotlib制作动画
来源:互联网 发布:霍启山评价郭晶晶 知乎 编辑:程序博客网 时间:2024/06/01 10:47
import matplotlib.pylab as pltimport numpy as npimport matplotlib.animation as animationfig = plt.figure()ax = fig.add_subplot(111)n= 10x= np.random.rand(n)y= np.random.rand(n)z= np.random.rand(n)###^代表三角星,*代表五角星 +代表十字 ,b,g,b代表颜色circles,pentagon,dots = ax.plot(x,'bo',y,'g+',z,'b.')ax.set_ylim(0,1)plt.axis('off')#更新屏幕的内容def update(data): circles.set_ydata(data[0]) pentagon.set_ydata(data[1]) return circles,pentagon#使用numpy生成随机数def generated(): while True: yield np.random.rand(2,n)anim = animation.FuncAnimation(fig,update,generated,interval=150)plt.show()
阅读全文
0 0
- matplotlib制作动画
- 利用Matplotlib和ImageMagick制作gif动画
- python 制作图表 matplotlib
- matplotlib里的动画
- matplotlib 绘制动画
- 【Python】【matplotlib】动画
- Matplotlib绘制动画
- 使用Matplotlib制作动图
- matplotlib绘制动画的示例
- matplotlib简易入门教程及动画
- matplotlib绘制动画的示例
- matplotlib模块数据可视化-动画
- matplotlib 动画 绘图 延时与暂停
- Python/Matplotlib实现雨点图动画
- 简单制作水波动画
- 第十五讲 动画制作
- SCADA动画制作步骤
- Photoshop动画制作
- sizeof与stelen的区别与联系
- FZU
- 4、新手入手树莓派教程--安装Qt
- 模拟实现strncpy,strncat,strncmp
- a = a + b 与 a += b 的区别
- matplotlib制作动画
- 适配iOS11--contentInsetAdjustmentBehavior
- 用JavaScript面向对象画一个三角形
- Xcode9 iOS11适配 iPhoneX适配 heightForHeaderInSection、contentInset失效解决 contentInsetAdjustmentBehavior详解
- SVN Update Error: Please execute the 'Cleanup' command
- struts与spring集成
- python查看和更改当前工作目录
- 操作系统课程设计 -nachos- lab-new1
- 使用宏定义定义π的值,输出球的体积和表面积,球的半径r由键盘输入!