MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / pause

Function pause

site-packages/matplotlib/pyplot.py:274–297  ·  view source on GitHub ↗

Pause 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, see :mod:`matplotlib.animation`. No

(interval)

Source from the content-addressed store, hash-verified

272
273
274def pause(interval):
275 """
276 Pause for *interval* seconds.
277
278 If there is an active figure, it will be updated and displayed before the
279 pause, and the GUI event loop (if any) will run during the pause.
280
281 This can be used for crude animation. For more complex animation, see
282 :mod:`matplotlib.animation`.
283
284 Notes
285 -----
286 This function is experimental; its behavior may be changed or extended in a
287 future release.
288 """
289 manager = _pylab_helpers.Gcf.get_active()
290 if manager is not None:
291 canvas = manager.canvas
292 if canvas.figure.stale:
293 canvas.draw_idle()
294 show(block=False)
295 canvas.start_event_loop(interval)
296 else:
297 time.sleep(interval)
298
299
300@docstring.copy_dedent(matplotlib.rc)

Callers

nothing calls this directly

Calls 5

showFunction · 0.70
get_activeMethod · 0.45
draw_idleMethod · 0.45
start_event_loopMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected