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()
得到一个简单的折线图:
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()
得到一个简单的折线图: