小编ShG*_*hGh的帖子

基于 geopandas、python 的 shapefile 属性的线宽

我想绘制一个shapefile使用 geopandas 的图。我希望线条的粗细符合shapefile. 我为此使用以下命令:

shp_sub.plot(column='Case1_2', cmap='BuGn', figsize=(5,5), linewidth=shp_sub['Case1_2'], edgecolor='0.8', vmin=0, vmax=1)
Run Code Online (Sandbox Code Playgroud)

这意味着厚度和颜色代码应该相互匹配。

我已经尝试过这个:

shp_sub.plot(column='Case1_2', cmap='BuGn', figsize=(5,5), linewidth=1, edgecolor='0.8', vmin=0, vmax=1)
Run Code Online (Sandbox Code Playgroud)

图1

当我尝试这个时,我没有得到一对一的。

shp_sub.plot(column='Case1_2', cmap='BuGn', figsize=(5,5), linewidth=shp_sub['Case1_2'], edgecolor='0.8', vmin=0, vmax=1)
Run Code Online (Sandbox Code Playgroud)

图2

python shapefile geopandas

5
推荐指数
1
解决办法
6046
查看次数

标签 统计

geopandas ×1

python ×1

shapefile ×1