import matplotlib.pyplot as plt

x = [[1, 3], [2, 5]]  # [1,3]是线段1两端点的x坐标
y = [[4, 7], [6, 3]]  # [1,3]是线段1两端点的y坐标
plt.figure()  # 创建绘制窗口

for i in range(len(x)):
    plt.plot(x[i], y[i], color='r')
    plt.scatter(x[i], y[i], color='b')
plt.show()

 

posted on 2020-06-18 16:37  西伯尔  阅读(6677)  评论(0编辑  收藏  举报