@@ -66,15 +66,15 @@ Other python interpreters
6666=========================
6767
6868If you can't use ipython, and still want to use matplotlib/pylab from
69- an interactive python shell, eg the plain-ole standard python
70- interactive interpreter, or the interpreter in your favorite IDE, you
69+ an interactive python shell, e.g. the plain-ole standard python
70+ interactive interpreter, you
7171are going to need to understand what a matplotlib backend is
7272:ref: `what-is-a-backend `.
7373
7474
7575
76- With the TkAgg backend, that uses the Tkinter user interface toolkit,
77- you can use matplotlib from an arbitrary python shell. Just set your
76+ With the TkAgg backend, which uses the Tkinter user interface toolkit,
77+ you can use matplotlib from an arbitrary non-gui python shell. Just set your
7878``backend : TkAgg `` and ``interactive : True `` in your
7979:file: `matplotlibrc ` file (see :ref: `customizing-matplotlib `) and fire
8080up python. Then::
@@ -83,18 +83,22 @@ up python. Then::
8383 >>> plot([1,2,3])
8484 >>> xlabel('hi mom')
8585
86- should work out of the box. Note, in batch mode, ie when making
86+ should work out of the box. This is also likely to work with recent
87+ versions of the qt4agg and gtkagg backends, and with the macosx backend
88+ on the Macintosh. Note, in batch mode,
89+ i.e. when making
8790figures from scripts, interactive mode can be slow since it redraws
8891the figure with each command. So you may want to think carefully
89- before making this the default behavior.
90-
91- For other user interface toolkits and their corresponding matplotlib
92- backends, the situation is complicated by the GUI mainloop which takes
93- over the entire process. The solution is to run the GUI in a separate
94- thread, and this is the tricky part that ipython solves for all the
95- major toolkits that matplotlib supports. There are reports that
96- upcoming versions of pygtk will place nicely with the standard python
97- shell, so stay tuned.
92+ before making this the default behavior via the :file: `matplotlibrc `
93+ file instead of using the functions listed in the next section.
94+
95+ Gui shells are at best problematic, because they have to run a
96+ mainloop, but interactive plotting also involves a mainloop. Ipython
97+ has sorted all this out for the primary matplotlib backends. There
98+ may be other shells and IDEs that also work with matplotlib in interactive
99+ mode, but one obvious candidate does not:
100+ the python IDLE IDE is a Tkinter gui app that does
101+ not support pylab interactive mode, regardless of backend.
98102
99103.. _controlling-interactive :
100104
0 commit comments