@@ -52,14 +52,20 @@ Notebooks and IDEs
5252
5353If you are using a Notebook (e.g. `Jupyter <https://jupyter.org >`_) or an IDE
5454that renders Notebooks (PyCharm, VSCode, etc), then they have a backend that
55- will render the Matplotlib Figure when a code cell is executed. One thing to
56- be aware of is that the default Jupyter backend (``%matplotlib inline ``) will
55+ will render the Matplotlib Figure when a code cell is executed. The default
56+ Jupyter backend (``%matplotlib inline ``) creates static plots that
5757by default trim or expand the figure size to have a tight box around Artists
58- added to the Figure (see :ref: `saving_figures `, below). If you use a backend
59- other than the default "inline" backend, you will likely need to use an ipython
60- "magic" like ``%matplotlib notebook `` for the Matplotlib :ref: `notebook
61- <jupyter_notebooks_jupyterlab>` or ``%matplotlib widget `` for the `ipympl
62- <https://matplotlib.org/ipympl/> `_ backend.
58+ added to the Figure (see :ref: `saving_figures `, below). For interactive plots
59+ in Jupyter you will need to use an ipython "magic" like ``%matplotlib widget ``
60+ for the `ipympl <https://matplotlib.org/ipympl/ >`_ backend in ``jupyter lab ``
61+ or ``notebook>=7 ``, or ``%matplotlib notebook `` for the Matplotlib
62+ :ref: `notebook <jupyter_notebooks_jupyterlab >` in ``notebook<7 `` or
63+ ``nbclassic ``.
64+
65+ .. note ::
66+
67+ The `ipympl <https://matplotlib.org/ipympl/ >`_ backend is in a separate
68+ package, see :ref: `Installing ipympl <ipympl_install >`.
6369
6470.. figure :: /_static/FigureNotebook.png
6571 :alt: Image of figure generated in Jupyter Notebook with notebook
@@ -75,15 +81,6 @@ other than the default "inline" backend, you will likely need to use an ipython
7581.. seealso ::
7682 :ref: `interactive_figures `.
7783
78- .. note ::
79-
80- If you only need to use the classic notebook (i.e. ``notebook<7 ``),
81- you can use:
82-
83- .. sourcecode :: ipython
84-
85- %matplotlib notebook
86-
8784.. _standalone-scripts-and-interactive-use :
8885
8986Standalone scripts and interactive use
@@ -104,7 +101,7 @@ backend. These are typically chosen either in the user's :ref:`matplotlibrc
104101 QtAgg backend.
105102
106103When run from a script, or interactively (e.g. from an
107- `iPython shell <https://ipython.readthedocs.io/en/stable/ >`_) the Figure
104+ `IPython shell <https://ipython.readthedocs.io/en/stable/ >`_) the Figure
108105will not be shown until we call ``plt.show() ``. The Figure will appear in
109106a new GUI window, and usually will have a toolbar with Zoom, Pan, and other tools
110107for interacting with the Figure. By default, ``plt.show() `` blocks
0 commit comments