Skip to content

Commit 49f49fa

Browse files
committed
DOC: re-write pyplot.show docstring
1 parent bc4ecd5 commit 49f49fa

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

lib/matplotlib/pyplot.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -307,22 +307,31 @@ def draw_if_interactive(*args, **kwargs):
307307
# This function's signature is rewritten upon backend-load by switch_backend.
308308
def show(*args, **kwargs):
309309
"""
310-
Display all figures.
310+
Display all open figures.
311311
312-
When running in ipython with its pylab mode, display all
313-
figures and return to the ipython prompt.
312+
In non-interactive mode, **block** defaults to True. All figures
313+
will display and show will not return until all widows are closed.
314+
If there are no figures, return immediately.
314315
315-
In non-interactive mode, display all figures and block until
316-
the figures have been closed; in interactive mode it has no
317-
effect unless figures were created prior to a change from
318-
non-interactive to interactive mode (not recommended). In
319-
that case it displays the figures but does not block.
316+
In interactive mode **block** defaults to False. This will ensure
317+
that all of the figures are shown and immediately return.
320318
321319
Parameters
322320
----------
323321
block : bool, optional
324-
This is experimental, and may be set to ``True`` or ``False`` to
325-
override the blocking behavior described above.
322+
323+
If `True` block and run the GUI main loop until all windows
324+
are closed.
325+
326+
If `False` ensure that all windows are displayed and return
327+
immediately. In this case, you are responsible for ensuring
328+
that the event loop is running to have responsive figures.
329+
330+
See Also
331+
--------
332+
ion : enable interactive mode
333+
ioff : disable interactive mode
334+
326335
"""
327336
_warn_if_gui_out_of_main_thread()
328337
return _backend_mod.show(*args, **kwargs)

0 commit comments

Comments
 (0)