1.安装cartopy
创建新环境:https://www.machinelearningplus.com/deployment/conda-create-environment-and-everything-you-need-to-know-to-manage-conda-virtual-environment/
conda create --name mlenv python==3.7.5
激活环境后,安装cartopy包:
conda install -c conda-forge cartopy
安装教程:
https://scitools.org.uk/cartopy/docs/v0.15/installing.html
实例:
https://scitools.org.uk/cartopy/docs/v0.15/matplotlib/intro.html
2.测试
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
ax = plt.axes(projection=ccrs.PlateCarree())
ax.coastlines()
plt.show()
python绘图学习资料:
https://scitools.org.uk/cartopy/docs/v0.15/gallery.html