小编Fal*_*alc的帖子

当我更改坐标时,为什么 Shapely 会绘制两条线?

我正在尝试了解 Shapely 的工作原理。

我可以用下面的代码画一条简单的线:

import matplotlib.pyplot as plt

A = Point(0,0)
B = Point(1,1)
AB = LineString([A,B])

plt.plot(AB)
Run Code Online (Sandbox Code Playgroud)

但是当我改变坐标时:

A = Point(1,0)
B = Point(3,4)
AB = LineString([A,B])

plt.plot(AB)
Run Code Online (Sandbox Code Playgroud)

Shapely 决定绘制两条线,这是我不理解的行为。

使用Shapely 1.7.0

截屏

python matplotlib shapely

6
推荐指数
1
解决办法
5717
查看次数

标签 统计

matplotlib ×1

python ×1

shapely ×1