* import matplotlib as mpl(很强大)* import matplotlib.pyplot as plt(经常使用的子模块)复制代码
plt.plot(x,siny,label="sin(x)") plt.plot(x,cosy,color="red",linestyle="--",label="cons(x)") plt.xlabel("x axis") plt.ylabel("y value") plt.legend() plt.show()复制代码