import matplotlib.pyplot as plt
# 定义各条折线的坐标点
lines = [
[(0, 0), (-5, -1)],
[(0, -1), (-5, -2), (-6, -4), (-5, -5)],
[(-5, -3), (-4, -5)],
[(-4, -3), (3, -5)],
[(-3, -3), (-2, -4), (-3, -6), (8, -7)],
[(-3, -7), (-8, -8)]
]
# 绘制每条折线
for line in lines:
x_coords, y_coords = zip(*line)
plt.plot(x_coords, y_coords)
# 设置坐标轴范围和标签
plt.xlabel('X')
plt.ylabel('Y')
plt.grid(True)
plt.axis('equal')
# 显示图形
plt.show()