Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitefb030d

Browse files
authored
Merge pull request#9101 from tacaswell/doc_backends
Doc backends
2 parentsf6b812d +c201bb9 commitefb030d

File tree

1 file changed

+37
-33
lines changed

1 file changed

+37
-33
lines changed

‎tutorials/introductory/usage.py

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,13 @@ def my_plotter(ax, data1, data2, param_dict):
284284
# Again, for these simple examples this style seems like overkill, however
285285
# once the graphs get slightly more complex it pays off.
286286
#
287+
# Backends
288+
# ========
289+
#
287290
# .. _what-is-a-backend:
288291
#
289292
# What is a backend?
290-
#==================
293+
#------------------
291294
#
292295
# A lot of documentation on the website and in the mailing lists refers
293296
# to the "backend" and many new users are confused by this term.
@@ -399,10 +402,6 @@ def my_plotter(ax, data1, data2, param_dict):
399402
# :term:`pdf`
400403
# :term:`svg`
401404
# ...
402-
# :term:`GDK` :term:`png` :term:`raster graphics` --
403-
# :term:`jpg` the `Gimp Drawing Kit`_ Deprecated in 2.0
404-
# :term:`tiff`
405-
# ...
406405
# ============= ============ ================================================
407406
#
408407
# And here are the user interfaces and renderer combinations supported;
@@ -413,27 +412,42 @@ def my_plotter(ax, data1, data2, param_dict):
413412
# ============ ================================================================
414413
# Backend Description
415414
# ============ ================================================================
416-
# GTKAgg Agg rendering to a :term:`GTK` 2.x canvas (requires PyGTK_ and
417-
# pycairo_ or cairocffi_; Python2 only)
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. This can be enabled
418+
# in a Jupyter notebook with ``%matplotlib ipympl``
418419
# GTK3Agg Agg rendering to a :term:`GTK` 3.x canvas (requires PyGObject_
419420
# and pycairo_ or cairocffi_)
420-
# GTK GDK rendering to a :term:`GTK` 2.x canvas (not recommended and d
421-
# eprecated in 2.0) (requires PyGTK_ and pycairo_ or cairocffi_;
422-
# Python2 only)
423-
# GTKCairo Cairo rendering to a :term:`GTK` 2.x canvas (requires PyGTK_
424-
# and pycairo_ or cairocffi_; Python2 only)
421+
# This backend can be activated in IPython with
422+
# ``%matplotlib gtk3``.
423+
# macosx Agg rendering into a Cocoa canvas in OSX.
424+
# This backend can be activated in IPython with
425+
# ``%matplotlib osx``.
426+
# TkAgg Agg rendering to a :term:`Tk` canvas (requires TkInter_).
427+
# This backend can be activated in IPython with
428+
# ``%matplotlib tk``.
429+
# nbAgg Embed an interactive figure in a Jupyter classic notebook. This
430+
# backend can be enabled in Jupyter notebooks via
431+
# ``%matplotlib notebook``.
432+
# WebAgg On ``show()`` will start a tornado server with an interactive
433+
# figure.
425434
# GTK3Cairo Cairo rendering to a :term:`GTK` 3.x canvas (requires PyGObject_
426435
# and pycairo_ or cairocffi_)
436+
# Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_
437+
# or ``pyside``).
438+
# This backend can be activated in IPython with
439+
# ``%matplotlib qt4``.
440+
# GTKAgg Agg rendering to a :term:`GTK` 2.x canvas (requires PyGTK_ and
441+
# pycairo_ or cairocffi_; Python2 only)
442+
# This backend can be activated in IPython with
443+
# ``%matplotlib gtk``.
444+
# GTKCairo Cairo rendering to a :term:`GTK` 2.x canvas (requires PyGTK_
445+
# and pycairo_ or cairocffi_; Python2 only)
427446
# WXAgg Agg rendering to a :term:`wxWidgets` canvas
428-
# (requires wxPython_)
429-
# WX Native :term:`wxWidgets` drawing to a :term:`wxWidgets` Canvas
430-
# (not recommended and deprecated in 2.0) (requires wxPython_)
431-
# TkAgg Agg rendering to a :term:`Tk` canvas (requires TkInter_)
432-
# Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_ or ``pyside``)
433-
# Qt5Agg Agg rendering in a :term:`Qt5` canvas (requires PyQt5_)
434-
# macosx Cocoa rendering in OSX windows
435-
# (presently lacks blocking show() behavior when matplotlib
436-
# is in non-interactive mode)
447+
# (requires wxPython_. v4.0 (in beta) is
448+
# required for python3).
449+
# This backend can be activated in IPython with
450+
# ``%matplotlib wx``.
437451
# ============ ================================================================
438452
#
439453
# .. _`Anti-Grain Geometry`: http://antigrain.com/
@@ -451,18 +465,8 @@ def my_plotter(ax, data1, data2, param_dict):
451465
# .. _PyQt4: https://riverbankcomputing.com/software/pyqt/intro
452466
# .. _PyQt5: https://riverbankcomputing.com/software/pyqt/intro
453467
#
454-
# WX backends
455-
# ===========
456-
#
457-
# At present the release version of `wxPython` (also known as wxPython classic)
458-
# does not support python3. A work in progress redesigned version known as
459-
# wxPython-Phoenix_ does support python3.
460-
# Matplotlib should work with both versions.
461-
#
462-
# .. _wxPython-Phoenix: https://wxpython.org/Phoenix/docs/html/main.html
463-
#
464468
# GTK and Cairo
465-
#=============
469+
#-------------
466470
#
467471
# Both `GTK2` and `GTK3` have implicit dependencies on PyCairo regardless of the
468472
# specific Matplotlib backend used. Unfortunatly the latest release of PyCairo
@@ -471,7 +475,7 @@ def my_plotter(ax, data1, data2, param_dict):
471475
# wrapper.
472476
#
473477
# How do I select PyQt4 or PySide?
474-
#========================================
478+
#--------------------------------
475479
#
476480
# You can choose either PyQt4 or PySide when using the `qt4` backend by setting
477481
# the appropriate value for `backend.qt4` in your :file:`matplotlibrc` file. The

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp