leaveme = N.where(D['obs']['obs0'] > 5000) uwindlow = D['obs']['obs13'][thinme] vwindlow = D['obs']['obs14'][thinme] plow = pres[thinme] uwindhigh = D['obs']['obs13'][leaveme] vwindhigh = D['obs']['obs14'][leaveme] phigh = pres[leaveme] uwind = N.hstack((uwindlow, uwindhigh)) vwind = N.hstack((vwindlow, vwindhigh)) pthin = N.hstack((plow,phigh)) """ thin_locs = gridded_data.thinned_barbs(pres) # replace pres with pthin below to have thinned values ST._windbarbs_real(uwind[thin_locs], vwind[thin_locs], pres[thin_locs], delta=1, n=35, color="black") ST._temperature_real(temp, pres, color="black", linestyle="solid") ST._dewpoint_real(dewp, pres, color="black", linestyle="dashed") del pres, temp, dewp, thin_locs # Plot plt.axis([-20, 50, P_b, P_t]) plt.xlabel(r"Temperature ($^{\circ}$C) at 1000\,hPa") xticks = N.arange(-20, 51, 5) plt.xticks(xticks, ["" if tick % 10 != 0 else str(tick) for tick in xticks]) plt.ylabel("Pressure (hPa)") yticks = N.arange(P_bot, P_t - 1, -10 ** 4) ytix = ["%4u" % (p / 100.0) for p in yticks] plt.yticks(yticks, ytix) # yticks = N.arange(P_bot,P_t-1,-10**4) # plt.yticks(yticks,yticks/100)