It looks as if you're using 0.90.1.  All of these issues are fixed in 
0.91.2.  If you can upgrade, that's probably your best bet.

Or, if you have all the requirements, you can set "text.usetex" to True 
in your matplotlibrc which will use the "real" TeX on your system to 
typeset math -- that should support your expression.

Ssebuliba, J, Mnr <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> When I use;
> text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$', fontsize=20)
> 
> I get an error message below;
> File "/usr/lib/python2.5/site-packages/matplotlib/mathtext.py", line 616, in 
> _get_info
>     raise ValueError('unrecognized symbol "%s"' % sym)
> ValueError: unrecognized symbol "\mathr", unrecognized symbol "\mathcal"

0.90.1 was much less TeX-like in its mathtext support, and therefore 
doesn't support \mathrm, \mathcal etc..  You can, however do:

text(0.6, 0.6, r'$\cal{A}\rm{sin}(2 \omega t)$', fontsize=20)

which works for me.

> When I replace \mathrm with \mbox or \text, the error message I get is 
> basically the same, only that this time, the last line appears as;
> unrecognized symbol "\mbox", unrecognized symbol "\text"

\mbox and \text aren't supported by the built-in mathtext in any version.

Cheers,
Mike

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to