Can't render the \dagger LaTex symbol

Hi:

I am having problems with the \dagger LaTex symbol. The following code

import matplotlib.pyplot as plt

plt.plot([1,2,3])
plt.title(r'$ \dagger $')
plt.show()

produce a long Traceback that ends in

File "/usr/lib/pymodules/python2.6/matplotlib/mathtext.py", line 1997,
in raise_error
    raise ParseFatalException(msg + "\n" + s)
ParseFatalException: Expected end of math '$'
$ \dagger $ (at char 0), (line:1, col:1)

Other LaTex symbols works OK. For instance, if I use plt.title(r'$
\diamond $') instead, it works. I checked in mathtext.py, and \dagger
is in the list of symbols.

I am running Matplotlib '0.99.1.1'.

Any idea about this problem?

Alejandro.

Indeed that is a bug. That is one of about a dozen missing symbols from the mapping that I just found be comparing the legacy Adobe Type1 name-to-Unicode mapping in matplotlib to the LaTeX-to-Unicode mapping that is currently used. I committed these to master here:

    https://github.com/matplotlib/matplotlib/commit/7f55623c84eaa7df7c8c534350ac03a72c32fb83

Mike

···

On 09/01/2011 10:25 AM, Alejandro Weinstein wrote:

Hi:

I am having problems with the \dagger LaTex symbol. The following code

import matplotlib.pyplot as plt

plt.plot([1,2,3])
plt.title(r' \\dagger ')
plt.show()

produce a long Traceback that ends in

File "/usr/lib/pymodules/python2.6/matplotlib/mathtext.py", line 1997,
in raise_error
     raise ParseFatalException(msg + "\n" + s)
ParseFatalException: Expected end of math '' \dagger $ (at char 0), (line:1, col:1)

Other LaTex symbols works OK. For instance, if I use plt.title(r' \\diamond ') instead, it works. I checked in mathtext.py, and \dagger
is in the list of symbols.

I am running Matplotlib '0.99.1.1'.

Any idea about this problem?

Alejandro.

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA