三、grib数据可视化
(一)导入须要的模块
- >>> import matplotlib.pyplot as plt
- >>> from mpl_toolkits.basemap import Basemap
- >>> import numpy as np
(二)创建一个figure
- >>> plt.figure()
- <matplotlib.figure.Figure object at 0x107e65198>
(三)创建一个basemap实例
- >>> m=Basemap(projection='mill',lat_ts=10,llcrnrlon=lon.min(), \
- urcrnrlon=lon.max(),llcrnrlat=lat.min(),urcrnrlat=lat.max(), \
- resolution='c')
- >>> m.drawcoastlines(linewidth=0.25)
- <matplotlib.collections.LineCollection object at 0x1091c1f28>
- >>> m.drawcountries(linewidth=0.25)
- <matplotlib.collections.LineCollection object at 0x10621d0f0>
- >>> m.fillcontinents(color='coral',lake_color='aqua')
- >>> m.drawmapboundary(fill_color='aqua')
- <matplotlib.patches.Rectangle object at 0x10918b3c8>
- >>> m.drawmeridians(np.arange(0,360,30))
推荐阅读
2017年架构师最重要的48个小时 | 8折倒计时 都说自古要搬出华擎,比如比来搞了全球第一款Mini-ITX迷你规格的发烧级X299,但老大年夜哥华硕今天也发了块妖板,为双路工作站/办事器打造,却支>>>详细阅读
本文标题:基于Python的Grib数据可视化
地址:http://www.17bianji.com/lsqh/38292.html
1/2 1