@@ -146,34 +146,45 @@ Interactive mode controls:
146146
147147- whether created figures are automatically shown
148148- whether changes to artists automatically trigger re-drawing existing figures
149- - whether `.pyplot.show ` blocks or not
149+ - whether `.pyplot.show ` returns immediately or after all of the
150+ figures have been closed when given no arguments
150151
151152
152153If in interactive mode, then:
153154
154155- newly created figures will be shown immediately
155156- figures will automatically redraw on change
156- - pyplot.show will not block by default
157+ - pyplot.show will return immediately by default
157158
158159If not in interactive mode then:
159160
160161- newly created figures and changes to figures will
161162 not be reflected until explicitly asked to be
162- - pyplot.show will block by default
163+ - pyplot.show runs the GUI event loop and does not return until all of
164+ the plot windows are closed
163165
164166
165167If you are in non-interactive mode (or created figures while in
166168non-interactive mode) you may need to explicitly call `.pyplot.show `
167169to bring the windows onto your screen. If you only want to run the
168170GUI event loop for a fixed amount of time you can use `.pyplot.pause `.
169-
170- Being in interactive mode is orthogonal to the GUI event loop being
171- integrated with your command prompt. If you have the GUI event loop
172- integrated with your prompt, then shown figures will be "live" while
173- the prompt is waiting for input, if it is not integrated then your
174- figures will only be "live" when the GUI event loop is running (via
175- `.pyplot.show `, `.pyplot.pause `, or explicitly starting the GUI main
176- loop).
171+ This will both block the progress of your code (as if you had called
172+ `time.sleep `), raise ensure the current window is shown and if needed
173+ re-drawn, and run the GUI event loop (so the windows are "live" for
174+ intrection) for the specified period of time.
175+
176+ Being in "interactive mode" is orthogonal to the GUI event loop being
177+ integrated with your command prompt. If you use `pyplot.ion `, but
178+ have not arrange for the event loop integration your figures will
179+ appear but will not be "live" while the prompt is waiting for input.
180+ You will not be able to pan/zoom and the figure may not even render
181+ (the window might appear black, transparent, or as a snapshot the
182+ desktop under it). Conversely, if you configure the event loop
183+ integration displayed figures will be "live" while waiting for input
184+ at the prompt independent of pyplot's "interactive mode". In either
185+ case, the figures will be "live" if you use
186+ ``pyplot.show(block=True) ``, `.pyplot.pause `, or run the the GUI main
187+ loop in some other way.
177188
178189
179190.. warning ::
@@ -276,8 +287,7 @@ If you only need to use the classic notebook you can use
276287 %matplotlib notebook
277288
278289which uses the `.backend_nbagg ` backend which ships with Matplotlib.
279- However nbagg does not work in Jupyter Lab due to changes in the front
280- end.
290+ However nbagg does not work in Jupyter Lab.
281291
282292GUIs + jupyter
283293~~~~~~~~~~~~~~
@@ -295,5 +305,5 @@ the figure (if it does not raise an exception outright).
295305PyCharm, Spyder, and VSCode
296306---------------------------
297307
298- Many IDEs have built-in integration with Matplotlib, please consult its
308+ Many IDEs have built-in integration with Matplotlib, please consult their
299309documentation for configuration details.
0 commit comments