-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
blocking UI functions cause figure size to change #10566
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
The issue is that when the window is drawn to the screen we are not making the tk window big enough to fit the figure + the toolbar and the figure is getting slightly shrunk. Do you see this with Qt or Wx? |
Hi @tacaswell indeed it does not seem to be a problem with Qt5. |
QuLogic
added a commit
to QuLogic/matplotlib
that referenced
this issue
Mar 27, 2020
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.
1 task
QuLogic
added a commit
to QuLogic/matplotlib
that referenced
this issue
Mar 31, 2020
Previously, it was the window that was resized to the intended size, thus making the canvas smaller by the toolbar height. Fixes matplotlib#10083 for GTK3. Fixes matplotlib#10566 for GTK3.
QuLogic
added a commit
to QuLogic/matplotlib
that referenced
this issue
Mar 31, 2020
Previously, it was the window that was resized to the intended size, thus making the canvas smaller by the toolbar height. Fixes matplotlib#10083 for GTK3. Fixes matplotlib#10566 for GTK3.
QuLogic
added a commit
to QuLogic/matplotlib
that referenced
this issue
Mar 31, 2020
Previously, it was the window that was resized to the intended size, thus making the canvas smaller by the toolbar height. Fixes matplotlib#10083 for GTK3. Fixes matplotlib#10566 for GTK3.
toddrjen
pushed a commit
to toddrjen/matplotlib
that referenced
this issue
Apr 6, 2020
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug summary
when the GUI blocks (either via
plt.pause(...)
orplt.show(block=True)
) the size of the figure changes, and when it is saved to file the dimensions are mismatched to the ones set byset_size_inches(..)
Code for reproduction
Actual outcome
note: using Qt5 as backend doesn't cause problem:
note: replacing plt.pause(.1) with plt.show(block=False) gives:
Image size should not change.
Matplotlib version
print(matplotlib.get_backend())
): TkAggThe text was updated successfully, but these errors were encountered: