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

Skip to content

Commit c97f362

Browse files
committed
Proposed fix for matplotlib#5517
Added link to what is a backend suggestion to explicitly explain that if interactivity isn't working, you need to activate an interactive backend.
1 parent 72e7e7d commit c97f362

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

doc/faq/usage_faq.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,9 @@ and turned off via :func:`matplotlib.pyplot.ioff`.
522522

523523
.. note::
524524
Interactive mode works with suitable backends in ipython and in
525-
the ordinary python shell, but it does *not* work in the IDLE IDE.
525+
the ordinary python shell, but it does *not* work in the IDLE IDE.
526+
If the default backend does not support interactivity, an interactive
527+
backend can be explicitly activated using any of the methods discussed in `What is a backend?`_.
526528

527529

528530
Interactive example
@@ -545,9 +547,7 @@ can type additional commands such as::
545547

546548
and you will see the plot being updated after each line. This is
547549
because you are in interactive mode *and* you are using pyplot
548-
functions.
549-
550-
Now try an alternative method of modifying the
550+
functions. Now try an alternative method of modifying the
551551
plot. Get a reference to the :class:`~matplotlib.axes.Axes` instance, and
552552
call a method of that instance::
553553

@@ -564,8 +564,6 @@ you need to call :func:`~matplotlib.pyplot.draw`::
564564

565565
Now you should see the new line added to the plot.
566566

567-
If this example did not work, you may need to explicitly activate the qt backend. This can most simply be done by opening an ipython prompt using `ipython --matplotlib=qt` or using the ipython magic command of `%matplotlib qt` before you import matplotlib.
568-
569567
Non-interactive example
570568
-----------------------
571569

0 commit comments

Comments
 (0)