Re: [Matplotlib-users] Bug in mathtext

2007-12-04 Thread Jörgen Stenarson
Michael Droettboom skrev:
> Fernando Perez wrote:
>> Hey Jorgen,
>>
>> On Dec 4, 2007 12:10 PM, Jörgen Stenarson <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> I get a complete crash dumping me in the console when there are unknown
>>> latex commands in a mathtext expression, this when doing interactive
>>> stuff in ipython -pylab.
>>>
>>> examples:
>>> title("$|S_{11}|$")
>> that's odd, it's OK for mpl to throw the exception, what shouldn't be
>> happening is for ipython to fully crash out.  I can't reproduce it
>> with SVN mpl on my box, I tried both tkagg and gtkagg as backends and
>> in both cases I see the exception traceback (as Michael intended by
>> raising the error) but I simply get back the next ipython prompt, as
>> usual.  I don't understand how this particular exception could crash
>> out ipython, since it's being raised inside regular user code...
> 
> You're right -- I misread the original report.  It doesn't crash ipython 
> for me either.  I just get another ipython prompt.
> 
> Cheers,
> Mike
> 

Thanks Mike. I hope we can figure out what is causing the crashes but I 
guess we can take this over on the ipython-list. Fernando have you tried 
it on a windows machine? I'm using tkagg. Do you have any ideas on what 
I could start testing to isolate the problem?

/Jörgen

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug in mathtext

2007-12-04 Thread Michael Droettboom
Fernando Perez wrote:
> Hey Jorgen,
> 
> On Dec 4, 2007 12:10 PM, Jörgen Stenarson <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I get a complete crash dumping me in the console when there are unknown
>> latex commands in a mathtext expression, this when doing interactive
>> stuff in ipython -pylab.
>>
>> examples:
>> title("$|S_{11}|$")
> 
> that's odd, it's OK for mpl to throw the exception, what shouldn't be
> happening is for ipython to fully crash out.  I can't reproduce it
> with SVN mpl on my box, I tried both tkagg and gtkagg as backends and
> in both cases I see the exception traceback (as Michael intended by
> raising the error) but I simply get back the next ipython prompt, as
> usual.  I don't understand how this particular exception could crash
> out ipython, since it's being raised inside regular user code...

You're right -- I misread the original report.  It doesn't crash ipython 
for me either.  I just get another ipython prompt.

Cheers,
Mike

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

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug in mathtext

2007-12-04 Thread Fernando Perez
Hey Jorgen,

On Dec 4, 2007 12:10 PM, Jörgen Stenarson <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I get a complete crash dumping me in the console when there are unknown
> latex commands in a mathtext expression, this when doing interactive
> stuff in ipython -pylab.
>
> examples:
> title("$|S_{11}|$")

that's odd, it's OK for mpl to throw the exception, what shouldn't be
happening is for ipython to fully crash out.  I can't reproduce it
with SVN mpl on my box, I tried both tkagg and gtkagg as backends and
in both cases I see the exception traceback (as Michael intended by
raising the error) but I simply get back the next ipython prompt, as
usual.  I don't understand how this particular exception could crash
out ipython, since it's being raised inside regular user code...

Really, really strange...

f

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug in mathtext

2007-12-04 Thread Michael Droettboom
Jörgen Stenarson wrote:
> Hi,
> 
> I get a complete crash dumping me in the console when there are unknown 
> latex commands in a mathtext expression, this when doing interactive 
> stuff in ipython -pylab.

That is on purpose.  If you give mathtext something that is a syntax 
error, it throws an exception, showing where the syntax error occurred. 
  The only time mathtext gives warnings (as opposed to errors) is when a 
the expression is syntactically correct but the symbols can not be found 
in the currently configured font.  This is to make sure that plots are 
portable between matplotlib installations ... but the intention is not 
to fail silently on invalid expressions.

> examples:
> title("$|S_{11}|$")
> title("$\vbar S_{11} \vbar$")
> 
> I would also like to see an alias between | and \vert like there is in 
> regular latex.

That was an oversight -- and is a good idea.  This has been added in r4586.

Thanks for finding this,
Mike

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

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users