python第三方库的学习

网上教程:matplotlibnumply

1 #导入第三方库
2 import matplotlib as mpl    #将matplotlib作为mpl导入
3 import matplotlib.pyplot as plt     #将matplotlib.pyplot作为plt导入
4 import numpy as np      #将numpy作为np导入
5 #生成一个简单的图形
6 x = np.linspace(0,10,100)
7 plt.plot(x,np.sin(x))
8 plt.show()

运行结果:

 

posted @ 2022-04-13 19:39  hu-  阅读(101)  评论(0)    收藏  举报