Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
tk: Resize the canvas, not the figure.#16929
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Resizing the figure directly does not account for the toolbar, sofigures are actually a little shorter than they should be. The recentchange to `Text.get_window_extent` some how causes this to actually getreflected in the Matplotlib figure size, which cycles back to Tk andshrinks the window. However, this can be triggered by other calls to`Figure.set_size_inches` as noted in the fixed issues.Fixesmatplotlib#10083.Fixesmatplotlib#10566.Fixesmatplotlib#16926.
This could be backported to 3.2.2 if anyone feels strongly since it fixes other bugs, but it's not a regression, so it doesn't have to. |
anntzer left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
works for me, and makes sense.
Seems easy enough to backport, so I've tagged as 3.2. |
…929-on-v3.2.xBackport PR#16929 on branch v3.2.x (tk: Resize the canvas, not the figure.)
PR Summary
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 toFigure.set_size_inches
as noted in the linked issues.Fixes#10083.
Fixes#10566.
Fixes#16926.
PR Checklist