0
点赞
收藏
分享

微信扫一扫

python 折线图

归零者245号 2022-01-16 阅读 156
python

Matplotlib 是一个用 Python 编写的流行的数据可视化库。数据可视化有助于以简单直观的方式呈现大型和复杂的数据集。

import matplotlib.pyplot as plt

x = [1, 2, 3, 4, 5, 6]
y = [1, 5, 3, 5, 7, 8]

plt.plot(x, y)
plt.show()

得到一个简单的折线图:

​​​​​​​​​​​​​​

 

 

举报

相关推荐

0 条评论