How to plot one polygon on top of another polygon with geopandas

蹲街弑〆低调 提交于 2020-01-25 07:32:19

问题


I was trying to compare the size of two polygons by plotting them in one figure. For example, I want to put Kansas on top of Texas. however, because the two polygons share the same CRS, so when I was trying to plot them in one figure, they are separated with each one stay at their positions based on the CRS. I was wondering how to change my code (see below) to let Kansas (polygon) stay in Texas (polygon). Thanks.

kansas = gpd.read_file("kansas.shp")

texas = gpd.read_file("texas.shp")

ax = texas.plot()

kansas.plot(ax=ax)

来源:https://stackoverflow.com/questions/59671910/how-to-plot-one-polygon-on-top-of-another-polygon-with-geopandas

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!