- 积分
- 7778
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-6-10
- 最后登录
- 1970-1-1
|
发表于 2019-7-23 11:29:43
|
显示全部楼层
从网上查了资料,我用下面的程序测试cartopy,发现是一样的问题,但是mpl里的我都替换了啊
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
# set projection
ax = plt.axes(projection=ccrs.Robinson(central_longitude=150))
# plot coastlines & gridlines
ax.coastlines()
ax.gridlines(linestyle='--')
# show figure
plt.show()
执行后报错:
Traceback (most recent call last):
File "C:/liuming/20190704-人工影响天气指挥作业系统/PyCINRAD-master/test3.py", line 4, in <module>
ax = plt.axes(projection=ccrs.Robinson(central_longitude=150))
File "C:\liuming\20190312\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 876, in axes
return subplot(111, **kwargs)
File "C:\liuming\20190312\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 1084, in subplot
a = fig.add_subplot(*args, **kwargs)
File "C:\liuming\20190312\Anaconda3\lib\site-packages\matplotlib\figure.py", line 1349, in add_subplot
self, *args, **kwargs)
File "C:\liuming\20190312\Anaconda3\lib\site-packages\matplotlib\projections\__init__.py", line 83, in process_projection_requirements
projection_class, extra_kwargs = projection._as_mpl_axes()
File "C:\liuming\20190312\Anaconda3\lib\site-packages\cartopy\crs.py", line 185, in _as_mpl_axes
import cartopy.mpl.geoaxes as geoaxes
File "C:\liuming\20190312\Anaconda3\lib\site-packages\cartopy\mpl\geoaxes.py", line 49, in <module>
import cartopy.mpl.contour
ModuleNotFoundError: No module named 'cartopy.mpl.contour' |
|