matplotlib.texmanager

Support for embedded TeX expressions in Matplotlib.

Requirements:

  • LaTeX.

  • *Agg backends: dvipng>=1.6.

  • PS backend: PSfrag, dvips, and Ghostscript>=9.0.

  • PDF and SVG backends: if LuaTeX is present, it will be used to speed up some post-processing steps, but note that it is not used to parse the TeX string itself (only LaTeX is supported).

To enable TeX rendering of all text in your Matplotlib figure, set :rc:`text.usetex` to True.

TeX and dvipng/dvips processing results are cached in ~/.matplotlib/tex.cache for reuse between sessions.

TexManager.get_rgba can also be used to directly obtain raster output as RGBA NumPy arrays.