-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: inset-axes not having proper transform #10986
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
OK< I think this fixes the issue. OTOH, I still don't really understand what I still think this functionality could/should be moved to the base axes class at some point. |
I think this is far too restrictive. As I already pointed out somewhere, I think this should just stay as it was before the "fix".
|
@ImportanceOfBeingErnest Do you understand what My real proposed fix to this is #11005, where we do this all properly, includding proper documentation. OTOH, if you have a different PR to fix this, I'm not going to be offended if you push an alternate fix. i really don't understand what |
It may indeed be useful to get proper
for the default Now it's clear that specifying a bounding box like that is usually not desirable. I still think it's best to revert back to this old behaviour and update the documentation. This would at least make sure not get a non-working version out. I could provide a PR if desired. One problem seems that the documentation of axis_grid1 is somehow non-existent (c.f. #9582). So any update to it might not help anyone. |
@ImportanceOfBeingErnest #8120 is definitely still inconsistent for me on 2.2.2. All three of the plots (on screen, pdf, png) are different. If the point is that specifying I'm going to close as this breaks old behaviour. I'll also revert the old "fix". The associated issue should be closed as well, but only after we can write a proper workaround for the user... |
Just leave it as it is and I will come with a consistent PR tomorrow or so. This PR would
|
OK, thats great. Thanks a lot! |
The point of the example in #8120 is indeed that if you specify something in pixels, the output will be in pixels. If you then change dpi (which is done deliberatly for png, and unintentionally for pdf due to some other strange thing with pdf dpi), you will get seemingly arbitrary output - but they are all consistent. I suppose this is undesired in almost all cases, but who knows... why not position something in pixels? One definitely has to tell users about this in the docs, that's clear. |
Not saying pixels shouldn't be an option, but its a strange default for an inset axes. |
PR Summary
This should fix the issue noted in #10756 (comment) where #10756 didn't quite do the right thing. I went a step further and said bbox_to_anchor should always be a four-tuple. See #8952.
Fixes the reversion in 2.2.2 so that this didn't work:
Now works, tests pass, and examples look right. It may break other people's perceived ideas of what these functions are supposed to do. If so, please do report the issue, but in my mind the old state of things was pretty unclear.