File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,11 @@ def _draw_all_if_interactive():
122122
123123def install_repl_displayhook ():
124124 """
125- Install a repl display hook so that any stale figure are automatically
126- redrawn when control is returned to the repl.
125+ Connect to the display hook of the current shell.
126+
127+ The display hook gets called when the read-evaluate-print-loop (REPL) of
128+ the shell has finished the execution of a command. We use this callback
129+ to be able to automatically update a figure in interactive mode.
127130
128131 This works both with IPython and with vanilla python shells.
129132 """
@@ -155,15 +158,7 @@ def install_repl_displayhook():
155158
156159
157160def uninstall_repl_displayhook ():
158- """
159- Uninstall the Matplotlib display hook.
160-
161- .. warning::
162-
163- If you are using vanilla python and have installed another display hook,
164- this will reset `sys.displayhook` to what ever function was there when
165- Matplotlib installed its displayhook, possibly discarding your changes.
166- """
161+ """Disconnect from the display hook of the current shell."""
167162 global _REPL_DISPLAYHOOK
168163 if _REPL_DISPLAYHOOK is _ReplDisplayHook .IPYTHON :
169164 from IPython import get_ipython
You can’t perform that action at this time.
0 commit comments