plt.plot() 函数

根据 x(列表)和 y(列表)组成点,然后连接成线

实例:

import matplotlib.pyplot as plt
c = [1, 2, 6, 8, 10]
g = [1, 2, 10, 9, 8]
plt.figure(0)  # 创建画布
plt.plot(c, g)  # 连接成线
plt.show()  # 展示画布

原文地址:https://www.cnblogs.com/alivinfer/p/13273997.html