import matplotlib.pyplot as plt
plt.figure()
plt.plot([1,2,3,4,5])
plt.savefig("/content/s/fig.jpg")
plt.close() #只需要在绘图结尾关闭画笔就好
import matplotlib.pyplot as plt
plt.figure()
plt.plot([1,2,3,4,5])
plt.savefig("/content/s/fig.jpg")
plt.close() #只需要在绘图结尾关闭画笔就好