我正在尝试使用Cartopy的Proejction NearsidePerspective,但是与Matplotlib提供的真实地球图像重叠,并通过降低satellite_height
参数进行缩放。对于此特定类型的设置,Cartopy似乎无法正确修剪图像。图像显示仍然是人们期望的地图边界。
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
fig=plt.figure(figsize=(10,10))
# Set Projection
height=3000000
#height=35785831 # this is the default height
projection=ccrs.NearsidePerspective(central_longitude=120,
central_latitude=78,
satellite_height=height)
# Draw
ax = plt.axes(projection=projection)
ax.stock_img()
ax.coastlines(resolution='50m')
plt.show()
如何将Matplotlib的stock_img()和NearsidePerspective的这种配置结合起来才能正常工作?或者什么是获得所需结果的替代方法?
我在Jupyter Notebook,Matplotlib 3.0.2和Cartopy 0.16.0上使用Python 3.6。