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

Appearance settings

Commit cae8566

Browse filesBrowse files
authored
Merge pull request #13599 from meeseeksmachine/auto-backport-of-pr-13590-on-v3.1.x
Backport PR #13590 on branch v3.1.x (Doc event loop requirements for Figure.show)
2 parents e42b813 + d7cb979 commit cae8566
Copy full SHA for cae8566

File tree

Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,18 @@ def show(self, warn=True):
411411
:class:`~matplotlib.backend_bases.FigureManagerBase`, and
412412
will raise an AttributeError.
413413
414+
.. warning::
415+
This does not manage an GUI event loop. Consequently, the figure
416+
may only be shown briefly or not shown at all if you or your
417+
environment are not managing an event loop.
418+
419+
Proper use cases for `.Figure.show` include running this from a
420+
GUI application or an IPython shell.
421+
422+
If you're running a pure python shell or executing a non-GUI
423+
python script, you should use `matplotlib.pyplot.show` instead,
424+
which takes care of managing the event loop for you.
425+
414426
Parameters
415427
----------
416428
warn : bool

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.