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)
| 272 | |
| 273 | |
| 274 | def 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) |
nothing calls this directly
no test coverage detected