@@ -307,6 +307,14 @@ def new_figure_manager(*args, **kwargs):
307
307
308
308
# This function's signature is rewritten upon backend-load by switch_backend.
309
309
def draw_if_interactive (* args , ** kwargs ):
310
+ """
311
+ Redraw the current figure if in interactive mode.
312
+
313
+ .. warning::
314
+
315
+ End users will typically not have to call this function because the
316
+ the interactive mode takes care of this.
317
+ """
310
318
return _backend_mod .draw_if_interactive (* args , ** kwargs )
311
319
312
320
@@ -345,27 +353,30 @@ def show(*args, **kwargs):
345
353
346
354
def isinteractive ():
347
355
"""
348
- Return if pyplot is in "interactive mode" or not.
356
+ Return whether plots are updated after every plotting command.
357
+
358
+ The interactive mode is mainly useful if you build plots from the command
359
+ line and want to see the effect of each command while you are building the
360
+ figure.
349
361
350
- If in interactive mode then :
362
+ In interactive mode:
351
363
352
364
- newly created figures will be shown immediately;
353
365
- figures will automatically redraw on change;
354
366
- `.pyplot.show` will not block by default.
355
367
356
- If not in interactive mode then :
368
+ In non- interactive mode:
357
369
358
370
- newly created figures and changes to figures will not be reflected until
359
371
explicitly asked to be;
360
372
- `.pyplot.show` will block by default.
361
373
362
374
See Also
363
375
--------
364
- ion : enable interactive mode
365
- ioff : disable interactive mode
366
-
367
- show : show windows (and maybe block)
368
- pause : show windows, run GUI event loop, and block for a time
376
+ ion : Enable interactive mode.
377
+ ioff : Disable interactive mode.
378
+ show : Show all figures (and maybe block).
379
+ pause : Show all figures, and block for a time.
369
380
"""
370
381
return matplotlib .is_interactive ()
371
382
@@ -424,15 +435,16 @@ def __exit__(self, exc_type, exc_value, traceback):
424
435
425
436
def ioff ():
426
437
"""
427
- Turn interactive mode off.
438
+ Disable interactive mode.
439
+
440
+ See `.pyplot.isinteractive` for more details.
428
441
429
442
See Also
430
443
--------
431
- ion : enable interactive mode
432
- isinteractive : query current state
433
-
434
- show : show windows (and maybe block)
435
- pause : show windows, run GUI event loop, and block for a time
444
+ ion : Enable interactive mode.
445
+ isinteractive : Whether interactive mode is enabled.
446
+ show : Show all figures (and maybe block).
447
+ pause : Show all figures, and block for a time.
436
448
437
449
Notes
438
450
-----
@@ -459,15 +471,16 @@ def ioff():
459
471
460
472
def ion ():
461
473
"""
462
- Turn interactive mode on.
474
+ Enable interactive mode.
475
+
476
+ See `.pyplot.isinteractive` for more details.
463
477
464
478
See Also
465
479
--------
466
- ioff : disable interactive mode
467
- isinteractive : query current state
468
-
469
- show : show windows (and maybe block)
470
- pause : show windows, run GUI event loop, and block for a time
480
+ ioff : Disable interactive mode.
481
+ isinteractive : Whether interactive mode is enabled.
482
+ show : Show all figures (and maybe block).
483
+ pause : Show all figures, and block for a time.
471
484
472
485
Notes
473
486
-----
@@ -506,8 +519,8 @@ def pause(interval):
506
519
507
520
See Also
508
521
--------
509
- matplotlib.animation : Complex animation
510
- show : show figures and optional block forever
522
+ matplotlib.animation : Proper animations
523
+ show : Show all figures and optional block until all figures are closed.
511
524
"""
512
525
manager = _pylab_helpers .Gcf .get_active ()
513
526
if manager is not None :
0 commit comments