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

possible matplotlib bug in imaging.py #47

Closed
filefolder opened this issue Jan 30, 2024 · 2 comments
Closed

possible matplotlib bug in imaging.py #47

filefolder opened this issue Jan 30, 2024 · 2 comments

Comments

@filefolder
Copy link

Hi there,

Working through the Chile tutorial for a lab I'm putting together and hit a snag here:

pstream = read_rf(profilefile)
pstream.trim2(-5, 20, 'onset')
pstream.select(channel='??Q').normalize().plot_profile(scale=1.5, top='hist')
plt.gcf().set_size_inches(15, 10)
plt.show()
File ~/.local/lib/python3.11/site-packages/rf/imaging.py:318, in plot_profile(profile, fname, figsize, dpi, scale, fillcolors, trim, top, moveout_model)
    316 pd = model.calculate_delay_times(phase=phase, slowness=slowness)
    317 ax2 = ax.twinx()
--> 318 ax.get_shared_y_axes().join(ax, ax2)
    319 dkm = 50
    320 if profile[0].stats.endtime - profile[0].stats.onset > 50:

AttributeError: 'GrouperView' object has no attribute 'join'

matplotlib 3.8.2 so I suppose this is probably the issue.

Replacing line 318 with ax.sharey(ax2) solves it for me.

@trichter
Copy link
Owner

Hi!

Thanks a lot for reporting. Can you please double-check that you use the latest version? I think this was fixed with 2f79845.

@filefolder
Copy link
Author

oops! you are correct, for some reason I thought this was a fresh install. sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants