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?

Example:

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])
ax.imshow(randn(20,20))
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()])
Produces:



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

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to