-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
aspect='equal' ignored when parasitic axis added with twinx/twiny #7654
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
Comments
Two comments related to this:
We used to have a warning when the adjustable parameter was switched from 'box' to 'datalim' in this case. It is presently commented out. I think we need to uncomment it, and maybe even give it a longer explanation. |
This is partly addressed by #10033, but it looks like more can be done. Instead of setting adjustable to 'datalim' on twinned axes, I think that it would be possible to check at drawing time whether the aspect ratio is specified for more than a single axes in a twinned pair, and switch to datalim only in that case. A 'box' adjustable should work for twinned axes with only one aspect ratio specified; or perhaps also if specified aspect ratios are identical. |
I was investigating a fix for this bug and even after the partial changes made by 10033 there still seem to be issues and I need clarification on how it's supposed to behave.
|
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Uh oh!
There was an error while loading. Please reload this page.
Consider an axis with equal aspect ratio
Adding a parasitic axis with
twinx()
causes the plot to completely ignoreaspect='equal'
Creating the primary axis with the keyword argument
adjustable='box-forced'
causes it to obeyaspect='equal'
but the parasitic axis does not.Interestingly, everything works if the primary axis is created with
host_subplot
(noteadjustable='box-forced'
is still required). However, it seems to be prone to a similar issue to #7648 iffigure.autolayout
is setPlatform: Windows 7
matplotlib: 1.5.3
python: 2.7.12
The text was updated successfully, but these errors were encountered: