我想在坐标处注释城市名称柏林xy=(52.52, 13.405)
。我已经尝试过ax.annotate()
生成一张奇怪的地图。也许它与坐标的CRS有关?
import geopandas as gpd
import contextily as ctx
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
world = world[(world.name=="Germany")]
world = world.to_crs(epsg=3857)
ax = world.plot(figsize=(10, 10), color='none', linewidth=1, alpha=0.5)
ax.annotate("Berlin", xy=(52.52, 13.405))
ctx.add_basemap(ax, url=ctx.providers.Stamen.Watercolor, zoom=9)