我想并排绘制两个 tematic 地图以进行比较。我正在使用 geopandas 绘制地图,并使用 pysal 从空间分析中生成地图。
问问题
2809 次
2 回答
7
您可以使用 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-07-28T13:24:01.557 回答
3
为了并排获得两个 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)
于 2018-10-03T14:09:36.547 回答