You are reading an old version of the documentation (v2.0.2). For the latest version see https://matplotlib.org/stable/ Writing mathematical expressions¶ You can use a subset TeX markup in any matplotlib text string by placing it inside a pair of dollar signs ($). Note that you do not need to have TeX installed, since matplotlib ships its own TeX expression parser, layout engine and fonts. The lay