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

Skip to content

pgf: documentation fixes #1456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions doc/users/pgf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Typesetting With XeLaTeX/LuaLaTeX

Using the ``pgf`` backend, matplotlib can export figures as pgf drawing commands
that can be processed with pdflatex, xelatex or lualatex. XeLaTeX and LuaLaTeX
have full unicode support and can use any fonts installed in the operating
have full unicode support and can use any font that is installed in the operating
system, making use of advanced typographic features of OpenType, AAT and
Graphite. Pgf pictures created by ``plt.savefig('figure.pgf')`` can be
embedded as raw commands in LaTeX documents. Figures can also be directly
Expand All @@ -25,7 +25,7 @@ or registering it for handling pdf output
matplotlib.backend_bases.register_backend('pdf', FigureCanvasPgf)

The second method allows you to keep using regular interactive backends and to
save PDF files from the graphical user interface.
save xelatex, lualatex or pdflatex compiled PDF files from the graphical user interface.

Matplotlib's pgf support requires a recent LaTeX_ installation that includes
the TikZ/PGF packages (such as TeXLive_), preferably with XeLaTeX or LuaLaTeX
Expand Down Expand Up @@ -67,6 +67,9 @@ Computer Modern font face but require extended unicode support, consider
installing the `Computer Modern Unicode <http://sourceforge.net/projects/cm-unicode/>`_
fonts *CMU Serif*, *CMU Sans Serif*, etc.

When saving to ``.pgf``, the font configuration matplotlib used for the
layout of the figure is included in the header of the text file.

.. literalinclude:: plotting/examples/pgf_fonts.py
:end-before: plt.savefig

Expand Down Expand Up @@ -144,6 +147,11 @@ Troubleshooting
ways to cause problems. When experiencing problems, try to minimalize or
disable the custom preamble.

* If the font configuration used by matplotlib differs from the font setting
in yout LaTeX document, the alignment of text elements in imported figures
may be off. Check the header of your ``.pgf`` file if you are unsure about
the fonts matplotlib used for the layout.

* If you still need help, please see :ref:`reporting-problems`

.. _LaTeX: http://www.tug.org
Expand Down
2 changes: 1 addition & 1 deletion doc/users/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sufficiently mature.
PGF/TikZ backend
----------------
Peter Würtz wrote a backend that allows matplotlib to export figures as
drawing commands for LaTeX that can be processed by PdfLaTeX, XeLaTeX or
drawing commands for LaTeX. These can be processed by PdfLaTeX, XeLaTeX or
LuaLaTeX using the PGF/TikZ package. Usage examples and documentation are
found in :ref:`pgf-tutorial`.

Expand Down