Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to label axes in Matplotlib using LaTeX brackets?

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.

like image 221
drastega Avatar asked Jan 31 '14 17:01

drastega


1 Answers

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.

like image 183
Alvaro Fuentes Avatar answered Oct 27 '22 00:10

Alvaro Fuentes