编程语言
首页 > 编程语言> > python之Spyder绘图

python之Spyder绘图

作者:互联网

import numpy as np     #导入科学计算库
import matplotlib.pyplot as plt
a=np.arange(10)
plt.plot(a/a/a,a*2,'ro-',label='a')
plt.plot(a^2,a*2.5,'gx--',label='b')
plt.plot(a,a*1.5,'y*-',label='c')
plt.plot(a-1,a^4,'bs-',label='d')
plt.plot(a+1/1,a^2,'mH-',label='e')

plt.savefig('test3',dpi=600)
plt.savefig('../picture/test3',dpi=600)
plt.legend()
plt.show()

 

标签:plot,test3,plt,600,python,label,savefig,绘图,Spyder
来源: https://blog.csdn.net/sakura132/article/details/122236947