From: Gary <pa...@in...> - 2004-10-26 00:40:20
|
Chris Barker wrote: > Gary wrote: > >> AFAICT, It is not possible to mix text and TeX symbols in a string >> and have it come out right. For example, in >> >> xlabel(r'$\rm{Normalized Temperature} (kT/\epsilon)$' >> The text comes out in TeX math mode ... not so pretty. Please tell >> me what I've overlooked. > > > well, I'm not sure how this is supported in matplotlib, but in > LaTex,you would do: > > Normalized Temperature $(kT/\epsilon)$ > > or: > > $\text{Normalized Temperature} (kT/\epsilon)$ > > the "$" means put it in math mode, if you don't want "Normalized > Temperature" in math mode, don't put it inside the $$. The second puts > it all in math mode, but the text{} means set this in text mode. > > -Chris > Matplotlib doesn't support \text, and it requires that the first and last characters of a TeX string be $. I guess it only processes mathmode. Well, it can't do *everything*. It would be nice to figure out a workaround... thx, -gary |