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
Cannot find xaxis in version 0.4.2 #271
Comments
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import metpy
from metpy.plots import SkewT
print(metpy.__version__)
print(matplotlib.__version__)
pressure = np.linspace(1000, 100)
temperature = np.linspace(50, -50)
fig = plt.figure(figsize=(9, 9))
skew = SkewT(fig, rotation=45)
skew.plot(pressure, temperature, 'r')
skew.plot_dry_adiabats()
skew.plot_moist_adiabats()
skew.plot_mixing_lines()
skew.ax.set_ylim(1000, 100)
plt.show() That version of your code runs fine for me here on 0.4.2 (against matplotlib from defaults and metpy from conda-forge). Does it fail for you? I want to make sure I have a reliable test case and that your data doesn't make the difference. What matplotlib backend are you using? |
More importantly, do you set the matplotlib rcParam |
That's it...I had been using a personal style file for matplotlib that set
various default plotting parameters...one of which did set axes.grid to
True by default. If I disable that parameter, then it's able to plot fine.
Luke
…On Tue, Nov 29, 2016 at 3:18 PM, Ryan May ***@***.***> wrote:
More importantly, do you set the matplotlib rcParam axes.grid to True
somewhere? If you're not sure, add print(matplotlib.rcParams['axes.grid'])
somewhere near the top of the script.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#271 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACX-F6QznlOc9TtixjbgDNQLLxJUzd05ks5rDKSYgaJpZM4K_f91>
.
|
Ok, glad to have that confirmation. I was wondering how I managed to miss this. Setting that to I'll fix this up (once I figure out how to break this cycle) and get a 0.4.3 out with this and hopefully a fix for #270 this week. |
Thanks for the quick diagnosis. Glad it wasn't something more
fundamentally broken...not that I'd expect that!
…On Tue, Nov 29, 2016 at 3:31 PM, Ryan May ***@***.***> wrote:
Ok, glad to have that confirmation. I was wondering how I managed to miss
this. Setting that to False is your work-around for 0.4.2.
I'll fix this up (once I figure out how to break this cycle) and get a
0.4.3 out with this and hopefully a fix for #270
<#270> this week.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#271 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACX-F1Rp9xTT9mkObQlQd9l8zy7IF76jks5rDKeugaJpZM4K_f91>
.
|
No problem. I was really confused for a bit there wondering how the tests could have missed that! |
It looks like this was fixed with earlier SkewT adjustments, but it's still good to add a test (that failed without the fix). While we're at it, this test also hits the path that automatically creates a new figure.
It looks like this was fixed with earlier SkewT adjustments, but it's still good to add a test (that failed without the fix). While we're at it, this test also hits the path that automatically creates a new figure.
Fixed by 063d5b5. |
I had been successfully using the "SkewT" object in metpy to format SkewT plots in a variety of scripts. I recently upgraded to the latest metpy version (0.4.2) and all of my scripts that try making SkewT plots are now failing with an error that claims 'SkewXAxesSubplot' has no attribute 'xaxis'. I'm using Python 3.5.2/Anaconda and have matplotlib version 1.5.3. My plotting script and the full error message are shown below.
The text was updated successfully, but these errors were encountered: