Skip to main content
 首页 » 编程设计

Python 保存空图

2025年05月04日15lidabo

<分区>

EDIT: This question is a duplicate. Original question's link is posted above.

我正在使用 Python 绘制一组值,这些值在 Python 终端(使用 Jupyter NoteBook)上显示良好,但是当我保存它时,保存的文件在打开时显示一张空(全白)照片。这是我的代码:

import matplotlib.pyplot as plt 
plt.plot([1,3,4]) 
plt.show() 
plt.savefig('E:/1.png')