matplotlib.pyplot.install_repl_displayhook#

matplotlib.pyplot.install_repl_displayhook()[source]#

连接到当前 shell 的显示钩子。

当 shell 的读取-求值-打印循环 (REPL) 完成命令执行时,将调用显示钩子。我们使用此回调以便在交互模式下自动更新图形。

这适用于 IPython 和原生 Python shell。