I want to create labels to my plots with the latex computer modern font. However, the only way to persuade matplotlib to use the latex font is by inserting something like:>
The default Latex font is known as Computer Modern:
Computer Modern
from matplotlib import rc import matplotlib.pylab as plt rc('font', **{'family': 'serif', 'serif': ['Computer Modern']}) rc('text', usetex=True) x = plt.linspace(0,5) plt.plot(x,plt.sin(x)) plt.ylabel(r"This is $\sin(x)$", size=20) plt.show()