meteva规定了站点数据格式和格点数据格式,因此运用 meteva画图时,数据格式必须按它的来。原始数据最好是micpas数据,因为meteva提供了读取任意micpas类型的接口,读取后自动存为规定的格式。
import meteva.base as meb
import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'Times New Roman, SimSun'
plt.rcParams['mathtext.fontset'] = 'stix'
if __name__ == '__main__':
rain = meb.read_stadata_from_micaps3('00040108.000')
wind = meb.read_gridwind_from_micaps11('2000040108.000')
map_extend = [70, 140, 15, 55]
axs, minaxs = meb.creat_axs(1, map_extend, ncol=1, sup_title="xx年x月x日降水和风场", sup_fontsize=8, wspace=10)
meb.add_scatter(axs[0], rain, point_size=6, cmap=meb.cmaps.rain_24h, add_colorbar=True, alpha=1)
meb.add_barbs(axs[0], wind, color='k', skip=8, title=None, title_fontsize=4)
meb.add_scatter(minaxs[0], rain, cmap=meb.cmaps.rain_24h, add_colorbar=False, alpha=1)
plt.text(0.5, 1.02, 'test pic', size=10, transform=axs[0].transAxes)
plt.savefig(r"a.png", bbox_inches='tight')
plt.show()
![请添加图片描述](https://i-blog.csdnimg.cn/direct/eb5dd5cafc804345bd64e8d87f4e944b.png)