-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: xlim on plots with shared axes (GH2960, GH3490) #7322
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
Conversation
I see from another PR that @TomAugspurger is travelling... is there anyone else who could take a look at this? Seems like a nice patch to have in 0.14.1. (admittedly I am travelling also) |
cc @sinhrks can you have a look? |
@@ -1598,6 +1598,9 @@ def _make_plot(self): | |||
left, right = _get_xlim(lines) | |||
ax.set_xlim(left, right) | |||
|
|||
def _get_existing_lines(self): | |||
return self.ax.get_lines() if self.ax else [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also try to search on both right and left axes?
Good catch. I had created test_secondary_y_irregular_ts_xlim to test a secondary_y case but as written it only makes sure that a "primary" (non-secondary) axis is taken into consideration when you plot on the secondary axis, but not the other way around. I've strengthened the test and updated the code. |
@rosnfeld pls rebase |
Rebased. |
one more rebase pls (i just merged bunch of plot stuff) |
Ok, rebased again. |
ok, ping when green |
Travis is green on my fork but will take a while on the main pydata one I think. I am in Asia at the moment and unfortunately need to sleep. :) |
hahha...np...thanks |
Alright, it's green now. |
BUG: xlim on plots with shared axes (GH2960, GH3490)
thanks! |
Fixes #2960
Fixes #3490.
Summary of changes:
This does not fix #6608, which I now think is a fairly specific/rare case that could always be manually avoided by
x_compat=True
. I will still try and fix that, but it looks a bit uglier and I didn't want to hold back these more important changes.