python - 如何自动保存matplotlib生成的图片
PHP中文网
PHP中文网 2017-04-18 09:45:16
0
1
929
import matplotlib.pyplot as plt
import math


x_list = range(1,20)
y_list = range(1,20)

# draw
plt.figure(figsize=(13, 7))
plt.plot(x_list, y_list, color="red", linewidth=3)
plt.xlabel("")
plt.ylabel("R")
plt.title(u"x x")
plt.legend((u"图例",))

plt.ylim(0, 30)
plt.legend()
plt.show()
PHP中文网
PHP中文网

认证0级讲师

répondre à tous(1)
伊谢尔伦

plt.savefig('test.png')

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!