Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions galleries/users_explain/figure/interactive_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -405,17 +405,18 @@ The hook functions typically exhaust all pending events on the GUI
event queue, run the main loop for a short fixed amount of time, or
run the event loop until a key is pressed on stdin.

Matplotlib does not currently do any management of :c:data:`PyOS_InputHook` due
to the wide range of ways that Matplotlib is used. This management is left to
downstream libraries -- either user code or the shell. Interactive figures,
even with Matplotlib in "interactive mode", may not work in the vanilla python
repl if an appropriate :c:data:`PyOS_InputHook` is not registered.

Input hooks, and helpers to install them, are usually included with
the python bindings for GUI toolkits and may be registered on import.
Interactive figures, even with Matplotlib in "interactive mode", may not work
in REPL if an appropriate :c:data:`PyOS_InputHook` is not registered. This
management is left to upstream libraries or downstream code -- either explicit
user code or shell initialization -- in all toolkits but native macOS. Input
hooks, and helpers to install them, are usually included with the Python
bindings for GUI toolkits and may be registered on import. For the macOS
native toolkit Matplotlib owns code that exposes the toolkit to Python and thus
we register :c:data:`PyOS_InputHook` on GUI application initialization.

IPython also ships input hook functions for all of the GUI frameworks
Matplotlib supports which can be installed via ``%matplotlib``. This
is the recommended method of integrating Matplotlib and a prompt.
Matplotlib supports which can be installed via ``%matplotlib``. This is the
recommended method of integrating Matplotlib and a prompt.


IPython / prompt_toolkit
Expand Down