我根据点数据集创建了一个Shapely
Point
对象列表。如何在下面绘制这个点列表?points = [Point(-4.85624511894443, 37.1837967179202),
Point(-4.855703975302475, 37.18401757756585),
Point(-4.85516283166052, 37.1842384372115),
Point(-4.85343407576431, 37.182006629169),
Point(-4.85347524651836, 37.1804461589773),
Point(-4.855792124429867, 37.18108913443582),
Point(-4.85624511894443, 37.1837967179202)]
xs, ys = zip(*[(point.x, point.y) for point in points])
来避免双重循环。或者xs, ys = zip(*[point.xy for point in points])
。或者使用numpy,xs, ys = np.c_[[np.r_[point.xy] for point in points]].T
。 - Kardo Paska