当前位置:网站首页>数据输出-绘制动图
数据输出-绘制动图
2022-07-28 00:23:00 【坠金】
from matplotlib import animation
# 将迭代过程中保存下来的中间过程的图片制作成gif, 可以看到GMM模型的变化过程
imgs = []
fig = plt.figure()
#模型迭代时产生了一共有model.iterations张图片,存放在C:/Users/mage/Desktop/powSys/EM_GMM2/img中,制作动画就是根据这些静态图
for i in range(model.iterations):
path = "C:/Users/mage/Desktop/powSys/EM_GMM2/img/iteration" + str(i) + ".png"
img = plt.imread(path)
img = plt.imshow(img, animated=True)
imgs.append([img])
"""plt.figure()函数的作用是新建一张图像,这个图像是一个类似于相框一样的东西,上面可以放图片。这里"""
ani = animation.ArtistAnimation(fig,
imgs,
interval=500,
blit=True,
repeat_delay=1000)
ani.save("C:/Users/mage/Desktop/powSys/EM_GMM2/iterationAnime.gif", writer="pillow")边栏推荐
- Gbase 8C backup control function (III)
- Gbase 8C database object size function (I)
- QGIS制图:矢量数据制图流程及导出
- 萤石网络,难当「孤勇者」
- Open source flight control (Px4, ardupilot)
- 数据安全与隐私计算峰会-可证明安全:学习
- GBase 8c 服务器信号函数
- Blizzard Diablo 4 ps5 / PS4 beta added to Playstation database
- leetcode: 515. 在每个树行中找最大值
- Prediction of charitable donation behavior by EEG multivariate model analysis
猜你喜欢

N32L43x Flash读\写\擦除操作总结

The petrochemical industry is facing the tide of rising prices, and the digital dealer distribution system platform enables dealers and stores

Lambda表达式和Stream流

Prediction of charitable donation behavior by EEG multivariate model analysis

Graph theory analysis of white matter brain function network: neural markers for classification and prediction of depression

hypermesh 圆周阵列-插件

In the era of great changes in material enterprises, SRM supplier procurement system helps enterprises build a digital benchmark for property procurement

Establishment of elk log analysis system

Linux安装mysql8.0.29详细教程

2022 software testing skills robotframework + selenium library + Jenkins web Keyword Driven Automation practical tutorial
随机推荐
GBase 8c 恢复控制函数
Mark's story
2022 software testing skills robotframework + selenium library + Jenkins web Keyword Driven Automation practical tutorial
Game 302 of leetcode
Unreal ue4.27 switchboard porting engine process
BGP federal experiment
N32L43x Flash读\写\擦除操作总结
GBase 8c 事务ID和快照(三)
Lambda expressions and stream streams
Comparison between hardware SPI and software analog SPI rate
Machine learning how to achieve epidemic visualization -- epidemic data analysis and prediction practice
shell正则和元字符
unreal ue4.27 switchboard 移植出引擎流程
软件测试面试题:为什要在一个团队中开展测试工作?
Favorite songs
数据安全与隐私计算峰会-可证明安全:学习
基于 Flink CDC 实现海量数据的实时同步和转换
IIC read / write eefprom
Fiddler mobile packet capturing agent settings (for Huawei glory 60s)
自定义类型:结构体,枚举,联合