Text enclosed between dollar signs $...$
is interpreted as LaTeX markup.
It allows us to plot greek letters ($\alpha$
), superscripts ($F^2$
),
subscripts ($\phi_{\rm i}
$), and special symbols ($90^\circ$
).
By default, it is processed by MatPlotLib’s own LaTeX processor.
However, if usetex mode is activated, then the original LaTeX text
processor is used, and labels are typeset in LaTeX’s computer modern fonts.
For usetex mode to work, it may be necessary to install extra software.
Under Debian, the required packages are texlive-latex-extra
(and
dependencies), dvipng
and cm-super-minimal
. We have no clue how
to support usetex mode under Windows.
Original LaTeX fonts differ in many respects from MatPlotLib’s default
Helvetica fonts. Fonts from these different families should not be mixed.
Therefore, in usetex mode it is important that all plot labels and titles
be enclosed in $...$
, or for upright text ${\rm ...}$
.
To activate usetex mode, do one of the following:
USETEX
to True
, orrc['text.usetex']
to True
.