我正在使用Python 3.7中的轮廓线和轮廓来绘制大气中的温度。我想针对压力的对数基数10和根据该压力计算出的伪高度绘制纬度。
example of the plot against just pseudo-altitude
我已经尝试过使用twinx()了,但这似乎不适用于contourf。
fig = plt.figure()
ax = fig.add_subplot(111)
''' below is the altitude (z) plot '''
#cs = T(ds, z, lat).plot.contourf(cmap = 'RdBu_r', levels=np.arange(150, 290, 10), yincrease=True)
#plt.ylabel('Approx. Altitude (km)', fontsize='large')
#plt.ylim(min(z), 80)
''' below is the log pressure (p) plot ''
cs = T(ds, p, lat).plot.contourf(levels=np.arange(150, 290, 10), yincrease=False)
ax.set_ylabel('Pressure (hPa)')
ax.set_yscale('log', basey=10)
如何在轮廓图上绘制2个y轴?
(请注意,这是我的第一篇文章,如果您需要更多信息,请告诉我!)