Re: [matplotlib-devel] SVG backend bug when called with Latex

2007-05-15 Thread John Hunter
On 5/12/07, Fernando Perez <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> the following shows a bug in the backend sate handling of mpl:
>
> plot(range(10))
> title(r'Foo $x=1$')
> savefig('foo.eps')  # works fine, as expected.
> savefig('foo.svg')  # doesn't work, that's OK: not implemented
> savefig('foo.eps')  # now, this doesn't work anymore.   That's the bug.
>
> Basically, when the SVG backend fails to properly generate the file
> with latex strings, it fails to resstore something in the backend
> state, and MPL ends up 'wedged'.  After that point, the only way to
> get an EPS plot again seems to be to restart the session.

This was a bug where tkagg was switching backends to svg, but not
trapping the error and resetting the backend on failure.  so you were
stuck in svg mode.  Now we catch the error, switch the backend back to
tkagg, and then reraise.

Fortunately, I had easy access to a platform where mathtext was
installed to test and debug on :-)

JDH

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] SVG backend bug when called with Latex

2007-05-15 Thread Fernando Perez
On 5/15/07, John Hunter <[EMAIL PROTECTED]> wrote:

> This was a bug where tkagg was switching backends to svg, but not
> trapping the error and resetting the backend on failure.  so you were
> stuck in svg mode.  Now we catch the error, switch the backend back to
> tkagg, and then reraise.

Note that I was using WXAgg where I saw it.

> Fortunately, I had easy access to a platform where mathtext was
> installed to test and debug on :-)

Glad to help :)

Off to the airport...

f

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] SVG backend bug when called with Latex

2007-05-15 Thread John Hunter
On 5/15/07, Fernando Perez <[EMAIL PROTECTED]> wrote:
> On 5/15/07, John Hunter <[EMAIL PROTECTED]> wrote:
>
> > This was a bug where tkagg was switching backends to svg, but not
> > trapping the error and resetting the backend on failure.  so you were
> > stuck in svg mode.  Now we catch the error, switch the backend back to
> > tkagg, and then reraise.
>
> Note that I was using WXAgg where I saw it.

It looks like this is a problem across many backends, and is best
handled in backend_agg itself.  I just made a few changes to agg,
tkagg, wxagg and gtkagg to fix this.  If anyone encounters weirdness,
let me know.

JDH

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel