我正在尝试使用metpy将标签添加到skewt图上的线条。我不确定这是否可能(看看metpy的GitHub,他们似乎还没有实现这个功能)。但基本上我只想给湿绝热材料、干绝热材料和混合比贴上标签。目前,我用来调用和绘制这些函数的代码是:
# Choose temperatures for moist adiabats
t0 = units.K * np.arange(278.15, 306.15, 4)
msa = skew.plot_moist_adiabats(t0=t0, linestyles='solid', colors='lime', linewidths=1.5)
# Choose starting temperatures in Kelvin for the dry adiabats
t0 = units.K * np.arange(243.15, 443.15, 10)
skew.plot_dry_adiabats(t0=t0,
linestyles='solid',
colors='gray',
linewidth=1.5)
及
# Choose the range of pressures that the mixing ratio lines are drawn over
p = units.hPa * np.linspace(1000, 400, 7)
skew.plot_mixing_lines(w=w, p=p, colors='lime')
MetPy目前无法自动标记这些特殊行。我相信你会发现,目前有一个open issue用于此。现在,您最好的解决方案是使用
ax.text
方法在绘图上手动添加文本,计算行顶部的露点以定位文本:相关问题 更多 >
编程相关推荐