matplotlib.pyplot.pause#

matplotlib.pyplot.pause(interval)[source]#

Run the GUI event loop forinterval seconds.

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

This can be used for crude animation. For more complex animation usematplotlib.animation.

If there is no active figure, sleep forinterval seconds instead.

See also

matplotlib.animation

Proper animations

show

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

Examples usingmatplotlib.pyplot.pause#

pyplot animation

pyplot animation

Rotating a 3D plot

Rotating a 3D plot

Animate a 3D wireframe plot

Animate a 3D wireframe plot

Faster rendering by using blitting

Faster rendering by using blitting