我想要并排绘制两个临时地图,然后进行比较。我使用geopandas来绘制地图,并使用pysal从空间分析中生成地图。
发布于 2018-07-28 21:24:02
您可以使用matplotlib创建子图结构,然后使用geopandas/pysal将图添加到特定子图中:
import matplotlib.pyplot as plt
fig, axes = plt.subplots(ncols=2)
# add geopandas plot to left subplot
geodataframe.plot(..., ax=axes[0])
# add pysal plot to right subplot using `axes[1]`发布于 2018-10-03 22:09:37
为了获得两个并排的geopandas地图,您可以这样写:
fig, (ax1,ax2) = plt.subplots(nrows=1, ncols=2, figsize=(20, 16))
ax1 = geodataframe.plot(ax=ax1, column='obs', legend=True)
ax2 = geodataframe.plot(ax=ax2, column='pred', legend=True)https://stackoverflow.com/questions/51549804
复制相似问题