I have a map that I want to project onto a sphere, I use cartopy as suggested in another thread. I program in Jupyter.
My code is:
import os
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
os.chdir(os.getenv("HOME"))
os.chdir("Downloads/")
img = plt.imread("europamap1.jpg")
plt.figure(figsize=(3, 3))
ax = plt.axes(projection=ccrs.Orthographic(-10, 45))
ax.gridlines(color="black", linestyle="dotted")
ax.imshow(img, origin="upper", extent=(-180, 180, -90, 90),
transform=ccrs.PlateCarree()) # Important
plt.show()
What I get is a white filled circle enter image description here
I don't know why I cannot see any gridlines nor the image! I tried to plot.show(img) and the image is loaded! I basically just copied and pasted from this thread