Repository navigation
Conversation
Fix bug: `Axes.xaxis.set_view_interval` , `Axes.xaxis.set_view_interval` do not update twin axis as `set_xlim` do. Add function: `Axes._set_viewLim_intervalx`, `Axes._set_viewLim_intervaly`
Fix error in previous commit.
|
It looks like the test failures are pep8/pycodestlye releated. We use and automated tool to check style consistency across the library. It seems silly, but for a library this big with this many contributors the consistent code style really does help. You have two lines that are too long. Could you also add a test, probably in test_axes. Something like @cleanup
def test_twinx_veiw_interval():
fig, ax = plt.subplots()
ax2 = ax.twinx()
# do the thing that exposed the bug
# assert that it is behaving correctly nowto make sure that this bug does not creep back in. |
|
I feel that A stupid question, which place is better for the discussion, in PR or in original issue? |
|
Here is probably better (as it is attached to the code). I think it comes down to how we should interpret user intent. If the user calls Expanding the view internal on set_xticks has been like that for a long time and many people maybe relying on the view-expanding behavior. Possibly breaking user code (with the exception of breaking work-arounds to bugs) makes changes have a much higher bar to be accepted. |
|
Reasonable, I agree with you. |
|
It looks like there are a couple of other places where While you are working on this could you clean those up too? |
|
For The rest I'll check them later. It occurs more than I thought. And we shall take care of every |
|
Sorry, still have no time for this PR. I'm busy working on my thesis. |
|
Closing as not active. Feel free to re-open if someone feels the need... |
Fix bug:
Axes.xaxis.set_view_interval,Axes.xaxis.set_view_intervaldo notupdate twin axis as
Axes.set_xlimdo.Add function:
Axes._set_viewLim_intervalx,Axes._set_viewLim_intervaly, they aim at changeviewLim.intervalx(y)and reduce the axes's callbacks and update the twin axis.Refer the issue #6863