Python 使用cartopy:ValueError进行轮廓绘制:变换无效:不支持球形轮廓绘制

Python 使用cartopy:ValueError进行轮廓绘制:变换无效:不支持球形轮廓绘制,python,matplotlib,cartopy,Python,Matplotlib,Cartopy,我想在用cartopy制作的地图上绘制等高线。如果我在以下位置运行示例: 使用github的最新代码签出,我得到: ValueError: invalid transform: Spherical contouring is not supported - consider using PlateCarree/RotatedPole. 我们应该怎么做 (作为对原始公告的回应)在cartopy文档中提供的示例http://scitools.org.uk/cartopy/docs/lates

我想在用cartopy制作的地图上绘制等高线。如果我在以下位置运行示例:

使用github的最新代码签出,我得到:

ValueError: invalid transform: Spherical contouring is not supported -  
consider using PlateCarree/RotatedPole.
我们应该怎么做


(作为对原始公告的回应)在
cartopy文档中提供的示例http://scitools.org.uk/cartopy/docs/latest/matplotlib/introductory_examples
与代码库相比已过时。有一个更新所有示例()的开发通知单

在这种情况下,只需更换管路即可

plt.contourf(lons, lats, data, transform=ccrs.Geodetic())

这个例子应该再次奏效

有 有一个可能感兴趣的轮廓示例 生成的图像:

嗯,

plt.contourf(lons, lats, data, transform=ccrs.PlateCarree())