From: Darren D. <dd...@co...> - 2007-04-05 13:17:31
|
Hi Adrian, On Thursday 05 April 2007 09:01:55 am Adrian Down wrote: > I am getting an error when I try to use any TeX formatting in plot > labels. There is an example below. I don't know if its relevant, but > I can only use the "latex" command in my OSX terminal. If I try > "latex sample.tex" in an x11 window, x11 claims no knowledge of latex. See http://www.scipy.org/Cookbook/Matplotlib/UsingTex. You need to make sure that latex, ghostscript and dvipng are all on your PATH. > I have had to install two libraries and hunt down my kpathsea library, > and this still isn't working. Is there any easier way to achieve text > and math together in a label, such as "Text $\pi$" ? Thanks, Usetex is currently the only way to render text that mixes regular text with mathtext. Also note, you should use raw strings: r"Text $\pi$", not "Text $\pi$" Darren |