From: per f. <per...@gm...> - 2010-01-31 22:21:41
|
hi all, two quick questions about labels. first, is there a way to make subscripts/superscripts *without* using TeX in labels? For example, I use helvetica in all my labels and I want to plot something like: plt.xlabel("log10") where "10" is a subscript of "log", but without doing: plt.xlabel(r"$\log_{10}$"), since that will use LaTeX fonts instead of my helvetica font. second question, when using TeX, I tried the following TeX command in labels: plt.annotate(r"\frac{\sigma}{\sqrt{\mu}}", ....) but it complains that "not all arguments converted during string formatting" -- but it seems like correct TeX to me. if I try r"\frac{1}{2}" then it works, but using \sigma and \sqrt inside breaks it.. any idea how to fix this? thanks. |