-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
tk window immediately resizes down to zero-height upon showing up. #16926
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
I'm guessing this is related to the flaky test on AppVeyor. The only thing that's hit by that test is the fix to My best guess is that |
So it seems that's not it, as I can never trigger a case where There's definitely something else weird going on; if you add an extra dpi changed on the old code:
then there will be one call to |
a question about how to use Chinese,when I want to show Chinese,it always shows me errors,thanks |
Resizing the figure directly does not account for the toolbar, so figures are actually a little shorter than they should be. The recent change to `Text.get_window_extent` some how causes this to actually get reflected in the Matplotlib figure size, which cycles back to Tk and shrinks the window. However, this can be triggered by other calls to `Figure.set_size_inches` as noted in the fixed issues. Fixes matplotlib#10083. Fixes matplotlib#10566. Fixes matplotlib#16926.
was #16828 backported to the v3.2.x branch? |
Ah, I understand now, not a regression on 3.2.x, but was backported there because it fixed some other bugs. |
You're right though; this bug was never in 3.2, so this issue shouldn't be tagged on it. |
Resizing the figure directly does not account for the toolbar, so figures are actually a little shorter than they should be. The recent change to `Text.get_window_extent` some how causes this to actually get reflected in the Matplotlib figure size, which cycles back to Tk and shrinks the window. However, this can be triggered by other calls to `Figure.set_size_inches` as noted in the fixed issues. Fixes matplotlib#10083. Fixes matplotlib#10566. Fixes matplotlib#16926.
Bug report
Bug summary
tk window (whether tkagg or mplcairo.tk) immediately resizes down to zero-height upon showing up.
Code for reproduction
Actual outcome
As described above.
Expected outcome
Window stays at original size.
Matplotlib version
print(matplotlib.get_backend())
): tkanyThis bisects to #16828 (attn @QuLogic), even though it's not clear how that's related... perhaps the dynamic changes to figure dpi confuse tk, but it's not clear why this is different from before?
The text was updated successfully, but these errors were encountered: