W3cubDocs

/Matplotlib 3.5

matplotlib.pyplot.pause

matplotlib.pyplot.pause(interval)[source]

Run the GUI event loop for interval seconds.

If there is an active figure, it will be updated and displayed before the pause, and the GUI event loop (if any) will run during the pause.

This can be used for crude animation. For more complex animation use matplotlib.animation.

If there is no active figure, sleep for interval seconds instead.

See also

matplotlib.animation

Proper animations

show

Show all figures and optional block until all figures are closed.

Examples using matplotlib.pyplot.pause

© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.pyplot.pause.html