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

DOC: Explain how to start the mainloop after show(block=False)#29742

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

Draft
timhoffm wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromtimhoffm:doc-show
Draft
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletionlib/matplotlib/pyplot.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -583,7 +583,10 @@ def show(*args, **kwargs) -> None:

If `False` ensure that all figure windows are displayed and return
immediately. In this case, you are responsible for ensuring
that the event loop is running to have responsive figures.
that the event loop is running to have responsive figures; in the
simplest form by calling ``fig.canvas.manager.mainloop()`` which is
what a blocking show is doing internally. Note that the GUI mainloop
itself is blocking.
Comment on lines +586 to +589
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
thattheeventloopisrunningtohaveresponsivefigures;inthe
simplestformbycalling``fig.canvas.manager.mainloop()``whichis
whatablockingshowisdoinginternally.NotethattheGUImainloop
itselfisblocking.
thattheeventloopisrunningtohaveresponsivefigures.Calling``fig.canvas.manager.mainloop()``
willworkforthesimplecasebecausethatiswhatablockingshowisdoinginternally.NotethattheGUImainloopisitselfblocking.

I think I'm getting tripped up by what simplest form is supposed to mean here


Defaults to True in non-interactive mode and to False in interactive
mode (see `.pyplot.isinteractive`).
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp