-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
set_size_inches doesn't resize window on macosx backend #15131
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
Hopefully this can be fixed soon. This issue prevents me from performing automatic figure resizing in proplot when the MacOSX backend is enabled (on macOS Catalina). |
Is this a regression, or did it always do this? |
Not sure. Looks like the MacOSX backend dates back very far but I couldn't find any other issues. I wouldn't be surprised if this is restricted to the latest macOS versions (Catalina, and IIRC this was also an issue for me on Mojave). Or perhaps very few people resize their figures in-place :) |
.. I have it behaving this way back to at least 2.1.0 on Catalina. Someone who needs this to work will need to dig into it to see what the problem is. Given that most of the devs use Qt5 or webAgg, and this has been around for a few years, I wouldn't count on this to be fixed "soon". |
Sorry if that came off wrong, just wanted to generate some discussion / hopefully get the attention of someone more experienced than me. I'll definitely dig around if I get the chance (I also use Qt5 but have been trying to make my auto-figure resizing algorithm more robust). |
The likely culprit is that matplotlib/lib/matplotlib/backends/backend_macosx.py Lines 107 to 129 in c185494
So just the empty base method gets called. It also seems that matplotlib/lib/matplotlib/backends/backend_qt5.py Lines 629 to 635 in c185494
but there does not seem to be any sort of "window" object on Not sure where to go from here; hopefully this helps someone else. |
I'm making some headway on this, along with a variety of other clean-ups for the macosx backend. It's complicated by the fact that the Figure windows on the Mac backend aren't using any kind of layout--it's hand-coded widget placement. |
Thanks for the PR/fix @dopplershift ! |
Using
set_size_inches()
correct resizes the figure canvas, but doesn't resize the window with themacosx
backend:results in

The text was updated successfully, but these errors were encountered: