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()
 
可得

 

 

 
posted @ 2022-03-16 17:47  yinghualeihenmei  阅读(68)  评论(0编辑  收藏  举报