【发布时间】:2020-07-06 05:13:17
【问题描述】:
我正在学习使用以下代码在 Spyder IDE 中使用 geopandas 包创建“分层”地图:
import geopandas as geopandas
import matplotlib.pyplot as plt
world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
cities = geopandas.read_file(geopandas.datasets.get_path('naturalearth_cities'))
world.plot()
ax = plt.subplot(1, 1)
world.plot(column='pop_est', ax=ax, legend=True)
我像在 RStudio 中一样逐行执行代码。 不幸的是,我只能得到一张白色的空白纸而不是地图。
【问题讨论】:
-
你能分享你的输出图像吗?你到底想要什么?与
geopandas文档中的内容相同? -
@linog,是的,这正是我想要复制的内容。
-
我的回答有帮助还是我错过了重点?