-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Improve initial macosx device scale #18274
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
This reverts commit db6fb4d. This should now be fixed with the previous commit.
Is this robust across mixed dpi devices? I seem to remember some issue with folks who had retina and non retina setups |
Well, the goal here is to be safe across those, that's the reason for the whole This PR only changes things to use an alternate API initially to try to get the scale factor from the |
To confirm, what DPI is the figure saved as now? |
Before: 100 DPI initially, 200 DPI after display |
Has the macosx backend been wrong all this time? Figures should be saved at the logical DPI, so 100, not 200. |
It's possible I introduced the shift while fixing issues. Let me see if I can carve out some time how this should work (Apple's view of things aside). |
This was not originally implemented in matplotlib#19126, but causes some inconsistencies with other backends. This also sets the initial scale as implemented in matplotlib#18274.
This was not originally implemented in matplotlib#19126, but causes some inconsistencies with other backends. This also sets the initial scale as implemented in matplotlib#18274.
This was not originally implemented in matplotlib#19126, but causes some inconsistencies with other backends. This also sets the initial scale as implemented in matplotlib#18274.
Should be replaced by #21365. |
This was not originally implemented in matplotlib#19126, but causes some inconsistencies with other backends. This also sets the initial scale as implemented in matplotlib#18274.
PR Summary
Fixes #18213. The problem is that the initial device scale in the macosx backend was set to 1.0--it would then update on the first display of a figure. This calls an API on window creation to update the device scale. This fixes the failing test for me locally.
PR Checklist