matplotlib.pyplot.ion#
- matplotlib.pyplot.ion()[source]#
Enable interactive mode.
See
pyplot.isinteractivefor more details.See also
ioffDisable interactive mode.
isinteractiveWhether interactive mode is enabled.
showShow all figures (and maybe block).
pauseShow all figures, and block for a time.
Notes
For a temporary change, this can be used as a context manager:
# if interactive mode is off# then figures will not be shown on creationplt.ioff()# This figure will not be shown immediatelyfig=plt.figure()withplt.ion():# interactive mode will be on# figures will automatically be shownfig2=plt.figure()# ...
To enable optional usage as a context manager, this function returns acontext manager object, which is not intended to be stored oraccessed by the user.
On this page