You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 3.1.0.post1496+gb03370a04
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.