我试着将蓝点从北极沿着本初子午线(longitude=0)放置,但却看到这些点沿着日期线(longitude=180)移动。代码:
#!/usr/bin/env python
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
Lon = 0
ax = plt.axes( projection=ccrs.Orthographic( central_latitude=70,
central_longitude=Lon) )
ax.set_global()
vector_crs = ccrs.RotatedPole( pole_latitude=90, pole_longitude=Lon )
ax.plot([Lon, Lon, Lon, Lon, Lon, Lon], # longitude
[ 90, 80, 70, 60, 50, 40], # latitude
'bo', markersize=5, transform=vector_crs)
ax.stock_img()
plt.show()

可能是一些与变换相关的东西,但我还没有弄清楚是什么。Cartopy版本0.14.2,Python 3.6。
发布于 2017-02-13 21:47:50
我认为问题来自于您定义的转换投影:
ax = plt.axes(projection=vector_crs)
ax.coastlines()
plt.show()

请注意,在变换投影中,这个简单的海岸线图看起来像中心经度为180°的Plate图。考虑到这一点,让我们看看如何使用Plate投影在绘图上绘制样本数据点,以便也尝试简化您要绘制的地图:
ax = plt.axes(projection=ccrs.PlateCarree())
ax.plot([Lon, Lon, Lon, Lon, Lon, Lon],
[ 90, 80, 70, 60, 50, 40],
'bo', markersize=5, transform=vector_crs)
ax.stock_img()
plt.show()

与您的示例一样,这些点不会出现在我们预期的位置。最后,让我们在将点绘制到正交地图上时,尝试使用Plate投影作为点的变换:
ax = plt.axes(projection=ccrs.Orthographic(central_latitude=70,
central_longitude=Lon))
ax.set_global()
ax.plot([Lon, Lon, Lon, Lon, Lon, Lon],
[ 90, 80, 70, 60, 50, 40],
'bo', markersize=5, transform=ccrs.PlateCarree())
ax.stock_img()
plt.show()

这似乎提供了更多您正在寻找的情节。
https://stackoverflow.com/questions/42165220
复制相似问题