手把手教你python画图(精简实例,一看就懂)

1、不叨叨,直接上代码

import matplotlib.pyplot as plt

x = [1,2,3,4,5]
y = [0,3,2,7,9]

plt.figure()
plt.plot(x, y,'r-', lw =5)
plt.show()

2、结果图

猜你喜欢

转载自blog.csdn.net/su_bao/article/details/81457954