@@ -322,13 +322,18 @@ def my_plotter(ax, data1, data2, param_dict):
322
322
# backend : WXAgg # use wxpython with antigrain (agg) rendering
323
323
#
324
324
# #. Setting the :envvar:`MPLBACKEND` environment
325
- # variable, either for your current shell or for a single script::
325
+ # variable, either for your current shell or for a single script. On Unix ::
326
326
#
327
- # > export MPLBACKEND=" module://my_backend"
327
+ # > export MPLBACKEND=module://my_backend
328
328
# > python simple_plot.py
329
329
#
330
330
# > MPLBACKEND="module://my_backend" python simple_plot.py
331
331
#
332
+ # On Windows, only the former is possible::
333
+ #
334
+ # > set MPLBACKEND=module://my_backend
335
+ # > python simple_plot.py
336
+ #
332
337
# Setting this environment variable will override the ``backend`` parameter
333
338
# in *any* ``matplotlibrc``, even if there is a ``matplotlibrc`` in your
334
339
# current working directory. Therefore setting :envvar:`MPLBACKEND`
@@ -360,19 +365,18 @@ def my_plotter(ax, data1, data2, param_dict):
360
365
# methods given above.
361
366
#
362
367
# If, however, you want to write graphical user interfaces, or a web
363
- # application server (:ref:`howto-webapp`), or need a better
364
- # understanding of what is going on, read on. To make things a little
365
- # more customizable for graphical user interfaces, matplotlib separates
366
- # the concept of the renderer (the thing that actually does the drawing)
367
- # from the canvas (the place where the drawing goes). The canonical
368
- # renderer for user interfaces is ``Agg`` which uses the `Anti-Grain
369
- # Geometry`_ C++ library to make a raster (pixel) image of the figure.
370
- # All of the user interfaces except ``macosx`` can be used with
371
- # agg rendering, e.g.,
372
- # ``WXAgg``, ``GTKAgg``, ``QT4Agg``, ``QT5Agg``, ``TkAgg``. In
373
- # addition, some of the user interfaces support other rendering engines.
374
- # For example, with GTK, you can also select GDK rendering (backend
375
- # ``GTK`` deprecated in 2.0) or Cairo rendering (backend ``GTKCairo``).
368
+ # application server (:ref:`howto-webapp`), or need a better understanding of
369
+ # what is going on, read on. To make things a little more customizable for
370
+ # graphical user interfaces, matplotlib separates the concept of the renderer
371
+ # (the thing that actually does the drawing) from the canvas (the place where
372
+ # the drawing goes). The canonical renderer for user interfaces is ``Agg``
373
+ # which uses the `Anti-Grain Geometry`_ C++ library to make a raster (pixel)
374
+ # image of the figure. All of the user interfaces except ``macosx`` can
375
+ # be used with Agg rendering, e.g., ``GTKAgg``, ``GTK3Agg``, ``Qt4Agg``,
376
+ # ``Qt5Agg``, ``TkAgg``, ``WxAgg``. In addition, some of the user interfaces
377
+ # support other rendering engines. For example, with GTK, GTK3, and QT5,
378
+ # you can also select Cairo rendering (backends ``GTKCairo``, ``GTK3Cairo``,
379
+ # ``Qt5Cairo``).
376
380
#
377
381
# For the rendering engines, one can also distinguish between `vector
378
382
# <https://en.wikipedia.org/wiki/Vector_graphics>`_ or `raster
@@ -397,65 +401,61 @@ def my_plotter(ax, data1, data2, param_dict):
397
401
# `Portable Document Format`_
398
402
# SVG :term:`svg` :term:`vector graphics` --
399
403
# `Scalable Vector Graphics`_
400
- # :term:`Cairo` :term:`png` :term:`vector graphics` --
401
- # :term:`ps` `Cairo graphics`_
402
- # :term:`pdf`
404
+ # :term:`Cairo` :term:`png` :term:`raster graphics` and
405
+ # :term:`ps` :term:`vector graphics` -- using the
406
+ # :term:`pdf` `Cairo graphics`_ library
403
407
# :term:`svg`
404
- # ...
405
408
# ============= ============ ================================================
406
409
#
407
410
# And here are the user interfaces and renderer combinations supported;
408
411
# these are *interactive backends*, capable of displaying to the screen
409
412
# and of using appropriate renderers from the table above to write to
410
413
# a file:
411
414
#
412
- # ============ ================================================================
413
- # Backend Description
414
- # ============ ================================================================
415
- # Qt5Agg Agg rendering in a :term:`Qt5` canvas (requires PyQt5_). This
416
- # backend can be activated in IPython with ``%matplotlib qt5``.
417
- # ipympl Agg rendering embedded in a Jupyter widget. (requires ipympl)
418
- # This can be enabled in a Jupyter notebook with
419
- # ``%matplotlib ipympl``
420
- # GTK3Agg Agg rendering to a :term:`GTK` 3.x canvas (requires PyGObject_
421
- # and pycairo_ or cairocffi_)
422
- # This backend can be activated in IPython with
423
- # ``%matplotlib gtk3``.
424
- # macosx Agg rendering into a Cocoa canvas in OSX.
425
- # This backend can be activated in IPython with
426
- # ``%matplotlib osx``.
427
- # TkAgg Agg rendering to a :term:`Tk` canvas (requires TkInter_).
428
- # This backend can be activated in IPython with
429
- # ``%matplotlib tk``.
430
- # nbAgg Embed an interactive figure in a Jupyter classic notebook. This
431
- # backend can be enabled in Jupyter notebooks via
432
- # ``%matplotlib notebook``.
433
- # WebAgg On ``show()`` will start a tornado server with an interactive
434
- # figure.
435
- # GTK3Cairo Cairo rendering to a :term:`GTK` 3.x canvas (requires PyGObject_
436
- # and pycairo_ or cairocffi_)
437
- # Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_
438
- # or ``pyside``).
439
- # This backend can be activated in IPython with
440
- # ``%matplotlib qt4``.
441
- # GTKAgg Agg rendering to a :term:`GTK` 2.x canvas (requires PyGTK_ and
442
- # pycairo_ or cairocffi_; Python2 only)
443
- # This backend can be activated in IPython with
444
- # ``%matplotlib gtk``.
445
- # GTKCairo Cairo rendering to a :term:`GTK` 2.x canvas (requires PyGTK_
446
- # and pycairo_ or cairocffi_; Python2 only)
447
- # WXAgg Agg rendering to a :term:`wxWidgets` canvas
448
- # (requires wxPython_. v4.0 (in beta) is
449
- # required for python3).
450
- # This backend can be activated in IPython with
451
- # ``%matplotlib wx``.
452
- # ============ ================================================================
415
+ # ========= ================================================================
416
+ # Backend Description
417
+ # ========= ================================================================
418
+ # Qt5Agg Agg rendering in a :term:`Qt5` canvas (requires PyQt5_). This
419
+ # backend can be activated in IPython with ``%matplotlib qt5``.
420
+ # ipympl Agg rendering embedded in a Jupyter widget. (requires ipympl).
421
+ # This backend can be enabled in a Jupyter notebook with
422
+ # ``%matplotlib ipympl``.
423
+ # GTK3Agg Agg rendering to a :term:`GTK` 3.x canvas (requires PyGObject_,
424
+ # and pycairo_ or cairocffi_). This backend can be activated in
425
+ # IPython with ``%matplotlib gtk3``.
426
+ # macosx Agg rendering into a Cocoa canvas in OSX. This backend can be
427
+ # activated in IPython with ``%matplotlib osx``.
428
+ # TkAgg Agg rendering to a :term:`Tk` canvas (requires TkInter_). This
429
+ # backend can be activated in IPython with ``%matplotlib tk``.
430
+ # nbAgg Embed an interactive figure in a Jupyter classic notebook. This
431
+ # backend can be enabled in Jupyter notebooks via
432
+ # ``%matplotlib notebook``.
433
+ # WebAgg On ``show()`` will start a tornado server with an interactive
434
+ # figure.
435
+ # Qt5Cairo Cairo rendering in a :term:`Qt5` canvas (requires PyQt5_ and
436
+ # cairocffi_).
437
+ # GTK3Cairo Cairo rendering to a :term:`GTK` 3.x canvas (requires PyGObject_,
438
+ # and pycairo_ or cairocffi_).
439
+ # Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_ or
440
+ # ``pyside``). This backend can be activated in IPython with
441
+ # ``%matplotlib qt4``.
442
+ # Qt4Cairo Cairo rendering in a :term:`Qt5` canvas (requires PyQt5_ and
443
+ # cairocffi_).
444
+ # GTKAgg Agg rendering to a :term:`GTK` 2.x canvas (requires PyGTK_, and
445
+ # pycairo_ or cairocffi_; Python2 only). This backend can be
446
+ # activated in IPython with ``%matplotlib gtk``.
447
+ # GTKCairo Cairo rendering to a :term:`GTK` 2.x canvas (requires PyGTK_,
448
+ # and pycairo_ or cairocffi_; Python2 only).
449
+ # WXAgg Agg rendering to a :term:`wxWidgets` canvas (requires wxPython_;
450
+ # v4.0 (in beta) is required for Python3). This backend can be
451
+ # activated in IPython with ``%matplotlib wx``.
452
+ # ========= ================================================================
453
453
#
454
454
# .. _`Anti-Grain Geometry`: http://antigrain.com/
455
455
# .. _Postscript: https://en.wikipedia.org/wiki/PostScript
456
456
# .. _`Portable Document Format`: https://en.wikipedia.org/wiki/Portable_Document_Format
457
457
# .. _`Scalable Vector Graphics`: https://en.wikipedia.org/wiki/Scalable_Vector_Graphics
458
- # .. _`Cairo graphics`: https://en.wikipedia .org/wiki/Cairo_(graphics)
458
+ # .. _`Cairo graphics`: https://wwW.cairographics .org
459
459
# .. _`Gimp Drawing Kit`: https://en.wikipedia.org/wiki/GDK
460
460
# .. _PyGTK: http://www.pygtk.org
461
461
# .. _PyGObject: https://wiki.gnome.org/action/show/Projects/PyGObject
@@ -489,11 +489,8 @@ def my_plotter(ax, data1, data2, param_dict):
489
489
# GTK and Cairo
490
490
# -------------
491
491
#
492
- # Both `GTK2` and `GTK3` have implicit dependencies on PyCairo regardless of the
493
- # specific Matplotlib backend used. Unfortunatly the latest release of PyCairo
494
- # for Python3 does not implement the Python wrappers needed for the `GTK3Agg`
495
- # backend. `Cairocffi` can be used as a replacement which implements the correct
496
- # wrapper.
492
+ # Both `GTK2` and `GTK3` depend on a Cairo wrapper (PyCairo or cairocffi) even
493
+ # if the Agg renderer is used. On Python3, only cairocffi is supported.
497
494
#
498
495
# How do I select PyQt4 or PySide?
499
496
# --------------------------------
0 commit comments