Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c3c5013

Browse files
committed
DOC: update pyplot documentation
- ion - ioff - isinteractive - pause
1 parent 295d71d commit c3c5013

File tree

1 file changed

+44
-5
lines changed

1 file changed

+44
-5
lines changed

lib/matplotlib/pyplot.py

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,31 +338,70 @@ def show(*args, **kwargs):
338338

339339

340340
def isinteractive():
341-
"""Return whether to redraw after every plotting command."""
341+
"""
342+
Return if pyplot is in "interactive mode" or not.
343+
344+
If in interactive mode then:
345+
346+
- newly created figures will be shown immediately
347+
- figures will automatically redraw on change
348+
- pyplot.show will not block by default
349+
350+
If not in interactive mode then:
351+
352+
- newly created figures and changes to figures will
353+
not be reflected until explicitly asked to be
354+
- pyplot.show will block by default
355+
356+
See Also
357+
--------
358+
ion : enable interactive mode
359+
ioff : disable interactive mode
360+
"""
342361
return matplotlib.is_interactive()
343362

344363

345364
def ioff():
346-
"""Turn the interactive mode off."""
365+
"""
366+
Turn the interactive mode off.
367+
368+
See Also
369+
--------
370+
ion : enable interactive mode
371+
isinteractive : query current state
372+
373+
"""
347374
matplotlib.interactive(False)
348375
uninstall_repl_displayhook()
349376

350377

351378
def ion():
352-
"""Turn the interactive mode on."""
379+
"""
380+
Turn the interactive mode on.
381+
382+
See Also
383+
--------
384+
ioff : disable interactive mode
385+
isinteractive : query current state
386+
"""
353387
matplotlib.interactive(True)
354388
install_repl_displayhook()
355389

356390

357391
def pause(interval):
358392
"""
359-
Pause for *interval* seconds.
393+
Run the GUI event loop or sleep for *interval* seconds and .
360394
361395
If there is an active figure, it will be updated and displayed before the
362396
pause, and the GUI event loop (if any) will run during the pause.
363397
364-
This can be used for crude animation. For more complex animation, see
398+
This can be used for crude animation. For more complex animation use
365399
:mod:`matplotlib.animation`.
400+
401+
See Also
402+
--------
403+
matplotlib.animation : Complex animation
404+
show : show figures and optional block forever
366405
"""
367406
manager = _pylab_helpers.Gcf.get_active()
368407
if manager is not None:

0 commit comments

Comments
 (0)