@@ -436,64 +436,6 @@ the desired format::
436436 :doc: `/gallery/user_interfaces/web_application_server_sgskip ` for
437437 information about running matplotlib inside of a web application.
438438
439- .. _howto-show :
440-
441- Use :func: `~matplotlib.pyplot.show `
442- -----------------------------------
443-
444- When you want to view your plots on your display,
445- the user interface backend will need to start the GUI mainloop.
446- This is what :func: `~matplotlib.pyplot.show ` does. It tells
447- Matplotlib to raise all of the figure windows created so far and start
448- the mainloop. Because this mainloop is blocking by default (i.e., script
449- execution is paused), you should only call this once per script, at the end.
450- Script execution is resumed after the last window is closed. Therefore, if
451- you are using Matplotlib to generate only images and do not want a user
452- interface window, you do not need to call ``show `` (see :ref: `howto-batch `
453- and :ref: `what-is-a-backend `).
454-
455- .. note ::
456- Because closing a figure window unregisters it from pyplot, you must call
457- `~matplotlib.pyplot.savefig ` *before * calling ``show `` if you wish to save
458- the figure as well as view it.
459-
460- Whether ``show `` blocks further execution of the script or the python
461- interpreter depends on whether Matplotlib is set to use interactive mode.
462- In non-interactive mode (the default setting), execution is paused
463- until the last figure window is closed. In interactive mode, the execution
464- is not paused, which allows you to create additional figures (but the script
465- won't finish until the last figure window is closed).
466-
467- Because it is expensive to draw, you typically will not want Matplotlib
468- to redraw a figure many times in a script such as the following::
469-
470- plot([1, 2, 3]) # draw here?
471- xlabel('time') # and here?
472- ylabel('volts') # and here?
473- title('a simple plot') # and here?
474- show()
475-
476- However, it is *possible * to force Matplotlib to draw after every command,
477- which might be what you want when working interactively at the
478- python console (see :ref: `mpl-shell `), but in a script you want to
479- defer all drawing until the call to ``show ``. This is especially
480- important for complex figures that take some time to draw.
481- :func: `~matplotlib.pyplot.show ` is designed to tell Matplotlib that
482- you're all done issuing commands and you want to draw the figure now.
483-
484- .. note ::
485-
486- :func: `~matplotlib.pyplot.show ` should typically only be called at
487- most once per script and it should be the last line of your
488- script. At that point, the GUI takes control of the interpreter.
489- If you want to force a figure draw, use
490- :func: `~matplotlib.pyplot.draw ` instead.
491-
492- .. versionadded :: v1.0.0
493- Matplotlib 1.0.0 and 1.0.1 added support for calling ``show `` multiple times
494- per script, and harmonized the behavior of interactive mode, across most
495- backends.
496-
497439.. _how-to-threads :
498440
499441Working with threads
0 commit comments