File tree 1 file changed +6
-11
lines changed
1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,11 @@ def _copy_docstring_and_deprecators(method, func=None):
114
114
115
115
def install_repl_displayhook ():
116
116
"""
117
- Install a repl display hook so that any stale figure are automatically
118
- redrawn when control is returned to the repl.
117
+ Connect to the display hook of the current shell.
118
+
119
+ The display hook gets called when the read-evaluate-print-loop (REPL) of
120
+ the shell has finished the execution of a command. We use this callback
121
+ to be able to automatically update a figure in interactive mode.
119
122
120
123
This works both with IPython and with vanilla python shells.
121
124
"""
@@ -152,15 +155,7 @@ def post_execute():
152
155
153
156
154
157
def uninstall_repl_displayhook ():
155
- """
156
- Uninstall the Matplotlib display hook.
157
-
158
- .. warning::
159
-
160
- If you are using vanilla python and have installed another display hook,
161
- this will reset `sys.displayhook` to what ever function was there when
162
- Matplotlib installed its displayhook, possibly discarding your changes.
163
- """
158
+ """Disconnect from the display hook of the current shell."""
164
159
global _IP_REGISTERED
165
160
global _INSTALL_FIG_OBSERVER
166
161
if _IP_REGISTERED :
You can’t perform that action at this time.
0 commit comments