Text#
matplotlib has extensive text support, including support for mathematical expressions, truetype support for raster and vector outputs, newline separated text with arbitrary rotations, and unicode support. These tutorials cover the basics of working with text in Matplotlib.

Typesetting with XeLaTeX/LuaLaTeX via the pgf backend
Typesetting with XeLaTeX/LuaLaTeX via the ``pgf`` backend