FIX: move twins when moving parents#22817
Draft
jklymak wants to merge 1 commit intomatplotlib:mainfrom
Draft
Conversation
Contributor
|
Perhaps discuss #21413 (comment) first? |
Member
Author
|
Yes, sorry, meant to make this draft.... |
|
Is #21413 (comment) resolved? |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Closes #21409, #21413 (which it replaces)
The original complaint was that
didn't properly position the twin. This will still be a problem with this PR, however
works fine (whereas it did not before). I think this is probably acceptable.
Why we can't make it more flexible is that
_make_twinis different forAxesSubplotversusAxesobjects.AxesSubplottwins take the SubplotSpec of the sibling, where asAxestwins are "located" with their sibling.The root of the problem here, in my opinion, is that twins are "siblings" versus children. If the twin was a child, it would just follow its parent around, but that is not how the code base with a Grouper treats them, and hence its not possible to tell which is the parent after the axes have been created.
PR Checklist
Tests and Styling
pytestpasses).flake8-docstringsand runflake8 --docstring-convention=all).Documentation
doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).