@@ -6,7 +6,7 @@ Typesetting With XeLaTeX/LuaLaTeX
6
6
7
7
Using the ``pgf `` backend, matplotlib can export figures as pgf drawing commands
8
8
that 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
10
10
system, making use of advanced typographic features of OpenType, AAT and
11
11
Graphite. Pgf pictures created by ``plt.savefig('figure.pgf') `` can be
12
12
embedded as raw commands in LaTeX documents. Figures can also be directly
@@ -25,7 +25,7 @@ or registering it for handling pdf output
25
25
matplotlib.backend_bases.register_backend(' pdf' , FigureCanvasPgf)
26
26
27
27
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.
29
29
30
30
Matplotlib's pgf support requires a recent LaTeX _ installation that includes
31
31
the 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
67
67
installing the `Computer Modern Unicode <http://sourceforge.net/projects/cm-unicode/ >`_
68
68
fonts *CMU Serif *, *CMU Sans Serif *, etc.
69
69
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
+
70
73
.. literalinclude :: plotting/examples/pgf_fonts.py
71
74
:end-before: plt.savefig
72
75
@@ -144,6 +147,11 @@ Troubleshooting
144
147
ways to cause problems. When experiencing problems, try to minimalize or
145
148
disable the custom preamble.
146
149
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
+
147
155
* If you still need help, please see :ref: `reporting-problems `
148
156
149
157
.. _LaTeX : http://www.tug.org
0 commit comments