@@ -6,7 +6,7 @@ Typesetting With XeLaTeX/LuaLaTeX
66
77Using the ``pgf `` backend, matplotlib can export figures as pgf drawing commands
88that can be processed with pdflatex, xelatex or lualatex. XeLaTeX and LuaLaTeX
9- have full unicode support and can use any fonts installed in the operating
9+ have full unicode support and can use any font that is installed in the operating
1010system, making use of advanced typographic features of OpenType, AAT and
1111Graphite. Pgf pictures created by ``plt.savefig('figure.pgf') `` can be
1212embedded as raw commands in LaTeX documents. Figures can also be directly
@@ -25,7 +25,7 @@ or registering it for handling pdf output
2525 matplotlib.backend_bases.register_backend(' pdf' , FigureCanvasPgf)
2626
2727 The second method allows you to keep using regular interactive backends and to
28- save PDF files from the graphical user interface.
28+ save xelatex, lualatex or pdflatex compiled PDF files from the graphical user interface.
2929
3030Matplotlib's pgf support requires a recent LaTeX _ installation that includes
3131the TikZ/PGF packages (such as TeXLive _), preferably with XeLaTeX or LuaLaTeX
@@ -67,6 +67,9 @@ Computer Modern font face but require extended unicode support, consider
6767installing the `Computer Modern Unicode <http://sourceforge.net/projects/cm-unicode/ >`_
6868fonts *CMU Serif *, *CMU Sans Serif *, etc.
6969
70+ When saving to ``.pgf ``, the font configuration matplotlib used for the
71+ layout of the figure is included in the header of the text file.
72+
7073.. literalinclude :: plotting/examples/pgf_fonts.py
7174 :end-before: plt.savefig
7275
@@ -144,6 +147,11 @@ Troubleshooting
144147 ways to cause problems. When experiencing problems, try to minimalize or
145148 disable the custom preamble.
146149
150+ * If the font configuration used by matplotlib differs from the font setting
151+ in yout LaTeX document, the alignment of text elements in imported figures
152+ may be off. Check the header of your ``.pgf `` file if you are unsure about
153+ the fonts matplotlib used for the layout.
154+
147155* If you still need help, please see :ref: `reporting-problems `
148156
149157.. _LaTeX : http://www.tug.org
0 commit comments