有谁能指导我如何在mplsaplevel html绘图中添加图例吗。第二,如何选择初始变焦?在
在geopandas中打开shapefile并在交互式web地图上打印属性
示例代码:
import geopandas as gp
shapefile = 'shapefile/ne_50m_admin_0_countries.shp'
df_shapefile_countries = gpd.GeoDataFrame.from_file(shapefile)
import mplleaflet
ax = df_shapefile_countries .plot(column='pop_est')
mplleaflet.show(fig=ax.figure)
示例图像: 我想立即放大例如东南亚
我想,现在,你想要的功能还没有实现。在
关于图例的第一个问题,请看这里:https://github.com/jwass/mplleaflet/issues/35
对于第二个问题,创造性,你可以用你想要的坐标来创建一个透明的绘图。例如,请查看以下代码:
这远不是完美的,只有在你想看得更远的时候才有用(我不知道在英语里是不是这样说的),但总比没有好。
ax.set_xlim
和/或ax.set_ylim
不能工作,因此不能使缩放比您想在地图上绘制的更近。在我希望有帮助。在
相关问题 更多 >
编程相关推荐