Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
dstansby merged 1 commit intomatplotlib:masterfromQuLogic:tk-resize
Mar 27, 2020

Conversation

QuLogic
Copy link
Member

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 toText.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

  • [n/a] Has Pytest style unit tests
  • Code isFlake 8 compliant
  • [n/a] New features are documented, with examples if plot related
  • [n/a] Documentation is sphinx and numpydoc compliant
  • [n/a] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • [n/a] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

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.
@QuLogicQuLogic added Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. GUI: tk labelsMar 27, 2020
@QuLogicQuLogic requested a review fromanntzerMarch 27, 2020 06:40
@QuLogic
Copy link
MemberAuthor

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.

Copy link
Contributor

@anntzeranntzer left a comment
edited
Loading

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.

@dstansbydstansby added this to thev3.2.2 milestoneMar 27, 2020
@dstansby
Copy link
Member

Seems easy enough to backport, so I've tagged as 3.2.

@dstansbydstansby merged commitd9b722f intomatplotlib:masterMar 27, 2020
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMar 27, 2020
timhoffm added a commit that referenced this pull requestMar 27, 2020
…929-on-v3.2.xBackport PR#16929 on branch v3.2.x (tk: Resize the canvas, not the figure.)
@QuLogicQuLogic deleted the tk-resize branchMarch 27, 2020 20:12
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer approved these changes

@dstansbydstansbydstansby approved these changes

Assignees
No one assigned
Labels
GUI: tkRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Milestone
v3.2.2
3 participants
@QuLogic@dstansby@anntzer

[8]ページ先頭

©2009-2025 Movatter.jp