Tex rendering bug

I tried rendering some TeX in a figure today but it didn’t work. I realized, text.usetex in the matplotlibrc file was set to False. When I add rc('text', usetex=True) to my script, the axis labels are rendered as TeX as well which is undesirable. I don’t remember ever having to set this before matplotlib 1.3.0 and I definitely don’t remember any difficulty rendering TeX.

Anyone else experiencing this behavior?


import matplotlib.patheffects as PathEffects

# matplotlib.rc('text', usetex=True)

fig = plt.figure(figsize=(4,4))
ax = fig.add_axes([0,0,0.9,1])
txt = ax.text(0.1, 0.5, r"Some \LaTeX\ $\alpha=\beta$", transform=ax.transAxes,fontsize=16)
txt.set_path_effects([PathEffects.Stroke(linewidth=3, foreground="w"), PathEffects.Normal()])


enter image description here

Uncommenting the `matplotlib.rc(‘text’, usetex=True)’ line, produces:

enter image description here