How to label axes in Matplotlib using LaTeX brackets?

latex, matplotlib, python

Solution

Try `ax.set_ylabel(r'$\langle B_{\mathrm{e}} \rangle$')` for labeling Y-Axis or `ax.set_title(r'$\langle B_{\mathrm{e}} \rangle$')` for the title of the axes.

Problem

How to label axes in Matplotlib using LaTeX expression `$\langle B_{\mathrm{e}} \rangle$`? I need to label my axis with nice looking "<" and ">" LaTeX brackets.

Original source