from matplotlib import pyplot as plt
x=[2,5]
y=[4,9]
plt.plot(x,y)
plt.savefig('D:\img.jpg')
或者保存为pdf格式:
plt.savefig('D:\img.pdf')
from matplotlib import pyplot as plt
x=[2,5]
y=[4,9]
plt.plot(x,y)
plt.savefig('D:\img.jpg')
或者保存为pdf格式:
plt.savefig('D:\img.pdf')