I wanna create a scatter plot of data on a map in Mercator projection. It only prints the empty map without values if I set the Projection in Mercator. It is, however, no problem if I choose the PlateCarree projection ....
Works fine:
ax1=plt.axes(projection=ccrs.PlateCarree())
ax1.add_feature(cf.BORDERS)
ax1.add_feature(cf.COASTLINE)
ax1.add_feature(cf.BORDERS)
ax1.add_feature(cf.STATES)
ax1.set_extent([-5, 10, 41, 52], crs=ccrs.PlateCarree())
ax1.set_title('xxx', fontsize=18);
ax1.grid(b=True, alpha=0.5)
obs200.plot(x="longitude", y="latitude", kind="scatter", c="mm", ax=ax1, cmap = "jet",
figsize=(18,20), title="xxx") # latitude: Breitengrad, longitude: Längengrad
prints empty map:
ax1=plt.axes(projection=ccrs.Mercator())
ax1.add_feature(cf.BORDERS)
ax1.add_feature(cf.COASTLINE)
ax1.add_feature(cf.BORDERS)
ax1.add_feature(cf.STATES)
ax1.set_extent([-5, 10, 41, 52], crs=ccrs.Mercator())
ax1.set_title('xxx', fontsize=18);
ax1.grid(b=True, alpha=0.5)
obs200.plot(x="longitude", y="latitude", kind="scatter", c="mm", ax=ax1, cmap = "jet",
figsize=(18,20), title="xxx") # latitude: Breitengrad, longitude: Längengrad
I couldn't find my example in other questions
A demonstration of geodataframes plotted on Mercator projection.