python 第二课,画图
在cmd文件中输入 pip install matplotlib
文件中输入
from re import X
from tkinter import Y
from matplotlib import pyplot as plt
import numpy as np
from pyparsing import alphanums
上面是自动生成
X=[1,2,3,4,5]
Y=[1,4,9,16,25]
plt.plot(X,Y)
plt.show()
可得
![](https://img2022.cnblogs.com/blog/1892002/202203/1892002-20220316173624642-1854925129.png)