我想绘制一个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)
当我尝试这个时,我没有得到一对一的。
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)