[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #KKF-677031]: Skew-T follow up question


Sorry for the delay, we got really busy with workshops and travel--but we're 
back now!

This is a really good question, would you be willing to go ask it on Stack 
Overflow so we can make the answer below more accessible (be sure to tag it 


The SkewT object in MetPy is a special thing, but it has a .ax attribute that 
is a standard Matplotlib Axes you can work with as normal, including using 
matplotlib's text() plotting command:

fig = plt.figure(figsize=(9, 9))
skew = SkewT(fig, rotation=45)

# Plot the data using normal plotting functions, in this case using
# log scaling in Y, as dictated by the typical meteorological plot
skew.plot(p, T, 'r')
skew.plot(p, Td, 'g')
skew.plot_barbs(p, u, v)
skew.ax.set_ylim(1000, 100)
skew.ax.set_xlim(-40, 60)

# these are matplotlib.patch.Patch properties
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)

# place a text box in upper left in axes coords
skew.ax.text(0.05, 0.95, 'LCL: 757mb', transform=skew.ax.transAxes, fontsize=14,
             verticalalignment='top', bbox=props)

Hope this helps,


> Hi,
> I am tinkering with the skew-t notebook we did at the training session.  Is
> there a way to put a text box on or next to the skew-t that includes the
> information.  (CAPE = xx, the LCL is XX, etc.)
> I know we did subplots, but I think the skew-t is a special king of figure
> that maybe has different rules?
> -John
> John Dumas
> Science and Operations Officer
> NWS Weather Forecast Office Oxnard, CA
> address@hidden
> (805) 988-6624

Ticket Details
Ticket ID: KKF-677031
Department: Support Python
Priority: Low
Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.