Text#
Matplotlib has extensive text support, including support formathematical expressions, TrueType support for raster andvector outputs, newline separated text with arbitraryrotations, and Unicode support. These tutorials coverthe basics of working with text in Matplotlib.
For even more information see theexamples page.

Text rendering with XeLaTeX/LuaLaTeX via the pgf backend
Text rendering with XeLaTeX/LuaLaTeX via the pgf backend