Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skew-T adiabats and mixing lines do not plot correctly if drawn before range is set #195

Open
jrleeman opened this issue Jul 16, 2016 · 0 comments
Labels
Area: Plots Pertains to producing plots Type: Enhancement Enhancement to existing functionality

Comments

@jrleeman
Copy link
Contributor

If user sets the axis limits before drawing the special lines, the lines are drawn far below the normal plotting range and would not appear on the plot. Example:

This works:

# Create a new figure. The dimensions here give a good aspect ratio
fig = plt.figure(figsize=(9, 9))
skew = SkewT(fig)

# 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', linewidth=2)
skew.plot(p, Td, 'g', linewidth=2)
skew.plot_barbs(p, u, v)

# Set axis limits
skew.ax.set_ylim(1000, 100)
skew.ax.set_xlim(-40, 60)

# Calculate full parcel profile and add to plot as black line
prof = parcel_profile(p, T[0], Td[0]).to('degC')
skew.plot(p, prof, 'k', linewidth=1)

# Add the relevant special lines
skew.plot_dry_adiabats()
skew.plot_moist_adiabats()
skew.plot_mixing_lines()

This does not:

# Create a new figure. The dimensions here give a good aspect ratio
fig = plt.figure(figsize=(9, 9))
skew = SkewT(fig)

# 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', linewidth=2)
skew.plot(p, Td, 'g', linewidth=2)
skew.plot_barbs(p, u, v)

# Calculate full parcel profile and add to plot as black line
prof = parcel_profile(p, T[0], Td[0]).to('degC')
skew.plot(p, prof, 'k', linewidth=1)

# Add the relevant special lines
skew.plot_dry_adiabats()
skew.plot_moist_adiabats()
skew.plot_mixing_lines()

# Set axis limits
skew.ax.set_ylim(1000, 100)
skew.ax.set_xlim(-40, 60)
@dopplershift dopplershift added Type: Enhancement Enhancement to existing functionality Area: Plots Pertains to producing plots labels Jul 31, 2016
@dopplershift dopplershift modified the milestone: Summer 2017 Mar 10, 2017
@dopplershift dopplershift modified the milestones: 0.6, Fall 2017 Jul 19, 2017
@jrleeman jrleeman modified the milestones: Fall 2017, Winter 2017 Oct 26, 2017
@jrleeman jrleeman modified the milestones: 0.7, Spring 2018 Nov 15, 2017
@jrleeman jrleeman removed this from the 0.8 milestone Apr 11, 2018
@dopplershift dopplershift added this to the 0.10 milestone May 18, 2018
@jrleeman jrleeman removed this from the 0.10 milestone Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Plots Pertains to producing plots Type: Enhancement Enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants