8000 Tk · matplotlib/matplotlib@5f4a18c · GitHub
[go: up one dir, main page]

Skip to content

Commit 5f4a18c

Browse files
committed
Tk
1 parent 3f4f42e commit 5f4a18c

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

galleries/users_explain/figure/backends.rst

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@ What is a backend?
1212
------------------
1313

1414
Backends are used for out-putting Matplotlib figures (see :ref:`figure-intro`),
15-
to the screen or for writing to files. A lot of
16-
documentation on the website and in the mailing lists refers to the "backend"
17-
and many new users are confused by this term. Matplotlib targets many different
18-
use cases and output formats. Some people use Matplotlib interactively from
19-
the Python shell and have plotting windows pop up when they type commands.
20-
Some people run `Jupyter <https://jupyter.org>`_ notebooks and draw inline
21-
plots for quick data analysis. Others embed Matplotlib into graphical user
22-
interfaces like PyQt or PyGObject to build rich applications. Some people use
23-
Matplotlib in batch scripts to generate postscript images from numerical
24-
simulations, and still others run web application servers to dynamically serve
25-
up graphs.
15+
to the screen or for writing to files. A lot of documentation on the website
16+
and in the mailing lists refers to the "backend" and many new users are
17+
confused by this term. Matplotlib targets many different use cases and output
18+
formats. Some people use Matplotlib interactively from the Python shell and
19+
have plotting windows pop up when they type commands. Some people run `Jupyter
20+
<https://jupyter.org>`_ notebooks and draw inline plots for quick data
21+
analysis. Others embed Matplotlib into graphical user interfaces like PyQt or
22+
PyGObject to build rich applications. Some people use Matplotlib in batch
23+
scripts to generate postscript images from numerical simulations, and still
24+
others run web application servers to dynamically serve up graphs.
2625

2726
To support all of these use cases, Matplotlib can target different
2827
outputs, and each of these capabilities is called a backend; the
@@ -286,8 +285,8 @@ point is to ensure that your GUI toolkit is installed properly, taking
286285
Matplotlib our of the testing. Almost all GUI toolkits have a small test
287286
program that can be run to test basic functionality. If this test fails, try re-installing.
288287

289-
PyQT
290-
^^^^
288+
PyQt(5,6) and PySide
289+
^^^^^^^^^^^^^^^^^^^^
291290

292291
.. code-block:: bash
293292
@@ -296,12 +295,19 @@ PyQT
296295
If you have ``PySide`` or ``PyQT6`` installed instead, just change the import
297296
accordingly
298297

298+
tkinter
299+
^^^^^^^
300+
301+
.. code-block:: bash
302+
303+
python3 -c "from tkinter import Tk; Tk().mainloop()"
304+
299305
GTK
300306
^^^
301307

302308
.. code-block:: bash
303309
304-
python3 -c 'from gi.repository import Gtk; win = Gtk.Window(); win.connect("destroy", Gtk.main_quit); win.show(); Gtk.main()'
310+
python3 -c "from gi.repository import Gtk; win = Gtk.Window(); win.connect('destroy', Gtk.main_quit); win.show(); Gtk.main()""
305311
306312
wxPython
307313
^^^^^^^^

0 commit comments

Comments
 (0)
0