funny bug with greek letters

Hi list,
when I do:
hist(randn(100)); xlabel('$\gamma$')
things work as expected.
However, if I try:
hist(randn(100)); xlabel('$\beta$')
then either I get an error, or I get the label "eta" under the plot.
Other letters seem to trigger this: tau, alpha, rho, maybe others.
This problems wether text.usetex is set to True or not (in matplolibrc file).

Version: 0.98.5.2 (Ubuntu Jaunty, ipython 0.9.1 shell).

Has anyone had the same problem, and is there any fix?
Sorry if this has been reported before, I tried to find it, but
nothing came out.

Thanks in advance

···

--
________________________________________________________
Nicolas Chopin
ENSAE
3, Avenue Pierre Larousse
92245 Malakoff CEDEX
FRANCE
tel +33 1 41 17 65 22 | fax +33 1 41 17 38 52
http://www.crest.fr/pageperso/Nicolas.Chopin/Nicolas.Chopin.htm

In [162]: print "\\beta"
eta$

In [163]: print r"\\beta"
\\beta

use the raw sting for math expression.
Regards,

-JJ

···

On Fri, Sep 4, 2009 at 12:06 PM, Nicolas Chopin<nicolas.chopin@...1860...> wrote:

Hi list,
when I do:
hist(randn(100)); xlabel('\\gamma')
things work as expected.
However, if I try:
hist(randn(100)); xlabel('\\beta')
then either I get an error, or I get the label "eta" under the plot.
Other letters seem to trigger this: tau, alpha, rho, maybe others.
This problems wether text.usetex is set to True or not (in matplolibrc file).

Version: 0.98.5.2 (Ubuntu Jaunty, ipython 0.9.1 shell).

Has anyone had the same problem, and is there any fix?
Sorry if this has been reported before, I tried to find it, but
nothing came out.

Thanks in advance

--
________________________________________________________
Nicolas Chopin
ENSAE
3, Avenue Pierre Larousse
92245 Malakoff CEDEX
FRANCE
tel +33 1 41 17 65 22 | fax +33 1 41 17 38 52
http://www.crest.fr/pageperso/Nicolas.Chopin/Nicolas.Chopin.htm

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

thanks a lot! I did not know about raw strings, sorry, even Python has
its black corners, I guess.
funny \gamma works, though.
On a related note, usetex=True is fancy, but produce much bigger eps
files for me, so I stick with the standard mathtex rendering.
Thanks again
Nicolas

2009/9/4 Nicolas Chopin <nicolas.chopin@...1860...>:

···

Hi list,
when I do:
hist(randn(100)); xlabel('\\gamma')
things work as expected.
However, if I try:
hist(randn(100)); xlabel('\\beta')
then either I get an error, or I get the label "eta" under the plot.
Other letters seem to trigger this: tau, alpha, rho, maybe others.
This problems wether text.usetex is set to True or not (in matplolibrc file).

Version: 0.98.5.2 (Ubuntu Jaunty, ipython 0.9.1 shell).

Has anyone had the same problem, and is there any fix?
Sorry if this has been reported before, I tried to find it, but
nothing came out.

Thanks in advance

--
________________________________________________________
Nicolas Chopin
ENSAE
3, Avenue Pierre Larousse
92245 Malakoff CEDEX
FRANCE
tel +33 1 41 17 65 22 | fax +33 1 41 17 38 52
http://www.crest.fr/pageperso/Nicolas.Chopin/Nicolas.Chopin.htm

--
________________________________________________________
Nicolas Chopin
ENSAE
3, Avenue Pierre Larousse
92245 Malakoff CEDEX
FRANCE
tel +33 1 41 17 65 22 | fax +33 1 41 17 38 52
http://www.crest.fr/pageperso/Nicolas.Chopin/Nicolas.Chopin.htm