📜  python 在同一张图上绘制两条线 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:34.455000             🧑  作者: Mango

代码示例2
# Short answer:
Call plt.plot() as many times as needed to add additional lines to plot.

# Example usage:
import matplotlib.pylot as plt
x_coordinates = [1, 2, 3]

y1_coordinates = [1, 2, 3]
y2_coordinates = [3, 4, 5]

plt.plot(x_coordinates, y1_coordinates) # plot first line
plt.plot(x_coordinates, y2_coordinates) # plot second line