
1、导入模块
1import matplotlib.pyplot as plt
2import cartopy.crs as ccrs
3from PIL import Image
4Image.MAX_IMAGE_PIXELS = None
2、定义出图函数
1img = plt.imread('/home/kesci/input/map4414/eo_base_2020_clean_geo.tif')
2def plot(projection):
3 fig = plt.figure(figsize=(16, 12))
4 ax = plt.axes(projection=projection)
5 ax.imshow(img, origin='upper', extent=[-180,180,-90,90], transform=ccrs.PlateCarree())
6 ax.gridlines(draw_labels=True)
7 plt.show()
3、绘制全球地图
1plot(ccrs.PlateCarree())

有问题可以到QQ群里进行讨论,我们在那边等大家。
QQ群号:854684131
文章转载自气海无涯,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




