我想在地图上画一个点列表,旁边每个点的id,这就是我正在做的
dfPoints["id"] = dfPoints.index
geomertrySensores2 = [Point(xy) for xy in zip(dfPoints['longitud'], dfPoints['latitud'])]
crs = {'int':'epsg:4326'}
geoSensores = gpd.GeoDataFrame(dfPoints,crs=crs, geometry = geomertrySensores2)
# creating color map for categories
categories = np.unique(geoSensores["id"])
colors = np.linspace(0, 1, len(categories))
colordict = dict(zip(categories, colors))
geoSensores["Color"] = geoSensores["id"].apply(lambda x: colordict[x])
f, ax = pl.subplots(figsize=(20,15))
geoBase.plot(color = 'grey', alpha=0.4, ax = ax)
geoSensores.plot(ax=ax, markersize=20, color="blue", marker="o", column='id')
但我无法在地图上添加每个点的id 怎么做呢? 我有255个点,所以我希望在它旁边绘制每个点的id,而不是使用调色板
我使用matplotlib解决了这个问题:
但是地图非常饱和,所以我使用了允许缩放的bokeh
相关问题 更多 >
编程相关推荐