#1.matplotlib
'''
import matplotlib.pyplot as plt #导入绘图第三方库
plt.plot([4,1,5,3,2],[6,4,1,2,5],[6,4,7,3,4]) #给图形拐点坐标赋值,并绘制2D图形
plt.savefig('test1',dpi=600)
plt.savefig('../picture/test1',dpi=600) #存储图形文件
plt.axis('equal') #
plt.show() #展示图形内容
'''
#2.matplotlib综合测试
'''
import matplotlib.pyplot as plt
plt.plot([4,1,4,3,2],[1,1,5,-5,2],[1,1,5,-5,2],[4,1,4,3,2])
plt.xlabel('Grade')
plt.ylabel('Course')
plt.savefig('test2',dpi=600)
plt.savefig('../picture/test2',dpi=600)
plt.axis('equal')
plt.show()
'''
#3.同一绘图区域绘制多图
import numpy as np #导入科学计算库
import matplotlib.pyplot as plt
a=np.arange(10)
plt.plot(-a/1,-a^2,'ro-',label='a')
plt.plot(a*2,a**2,'gx--',label='b')
plt.plot(a**1.5,a,'y*',label='c')
plt.plot(-a,a*3,'bs-',label='d')
plt.plot(a^4,-7*a,'mH--',label='e')
plt.savefig('test3',dpi=600)
plt.savefig('../picture/test3',dpi=600)
plt.legend()
plt.show()