Matplotlib pcolormesh'的卡通问题;GeoAxesSubplot';对象没有属性'_持有';

Matplotlib pcolormesh'的卡通问题;GeoAxesSubplot';对象没有属性'_持有';,matplotlib,cartopy,Matplotlib,Cartopy,只是想学习cartopy,但甚至不能对阵风数据进行简单的pcolormesh ax = plt.axes(projection = ccrs.LambertConformal()) cbax = ax.pcolormesh(gust['lon'], gust['lat'], gust['value'], transform = ccrs.PlateCarree()) 我得到的错误是:AttributeError:'GeoAxesSubplot'对象没

只是想学习cartopy,但甚至不能对阵风数据进行简单的pcolormesh

ax = plt.axes(projection = ccrs.LambertConformal())
cbax = ax.pcolormesh(gust['lon'], gust['lat'], gust['value'], 
                     transform = ccrs.PlateCarree())
我得到的错误是:AttributeError:'GeoAxesSubplot'对象没有属性'\u hold'

然而,contfourf图确实有效

cbax = ax.contourf(gust['lon'], gust['lat'], gust['value'], 
                   transform = ccrs.PlateCarree())

如何使用cartopy制作pcolormesh图形?

除了配置软件包版本外,您可能还想尝试下面讨论的代码


这至少对我有用。希望这会有所帮助。

您可能正在使用matplotlib 3.0.0?在这种情况下,更新到3.0.1或3.0.2就可以解决这个问题。更新到matplotlib 3.0.1,它就成功了。
from matplotlib.axes import Axes
from cartopy.mpl.geoaxes import GeoAxes
GeoAxes._pcolormesh_patched = Axes.pcolormesh