You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 3.0.2.post1738+g49c99041f
matplotlib
Fork me on GitHub

matplotlib.pyplot.install_repl_displayhook

matplotlib.pyplot.install_repl_displayhook()[source]

Install a repl display hook so that any stale figure are automatically redrawn when control is returned to the repl.

This works both with IPython and with vanilla python shells.