LaTeX markup

Enclose mathematical expressions in dollar signs to use Greek letters, subscripts, superscripts, and other symbols in plot labels:

ba.plot_curve(result, xlabel=r"$\alpha$ (deg)", ylabel=r"$R$")

MatPlotLib’s built-in math-text renderer handles these expressions without a LaTeX installation. Python raw strings (r"...") keep backslashes such as \alpha intact.

To use an external LaTeX installation instead, enable it before plotting:

ba.plt.rcParams['text.usetex'] = True

Alternatively, set the environment variable USETEX=True before importing BornAgain. External rendering requires LaTeX and backend-dependent tools; see MatPlotLib’s LaTeX guide for installation details.