Re: [Matplotlib-users] RuntimeError: could not open display

2011-09-01 Thread CompBio
First, you folks respond faster than lightning -- I can't keep up! Second, thanks for the tip -- that's definitely more elegant than my callow approach. John Hunter-4 wrote: > > On Thu, Sep 1, 2011 at 1:23 PM, CompBio wrote: > >> BTW, the reason I specify a PDF backend is because I thought i

Re: [Matplotlib-users] RuntimeError: could not open display

2011-09-01 Thread John Hunter
On Thu, Sep 1, 2011 at 1:23 PM, CompBio wrote: > BTW, the reason I specify a PDF backend is because I thought it would tell > matplotlib not to try to use anything else "behind the scenes" such as an > X-window display.  It's working the way I want now, so I assume that's what > it's doing. But

Re: [Matplotlib-users] RuntimeError: could not open display

2011-09-01 Thread CompBio
Thanks for your fast response -- faster than I could post a follow-up. You're right about the stack trace. It occurred to me after I posted that I should look to see exactly where the exception was triggered. As it turned out, I'd added a new module a few days ago and wasn't careful about where

Re: [Matplotlib-users] RuntimeError: could not open display

2011-09-01 Thread Eric Firing
On 09/01/2011 05:37 AM, CompBio wrote: > > I'm trying to get a script to work in batch mode to produce a large number of > plots. I've got the following sequence of imports in a matplotlib Python > script: Is the script being run standalone, from a shell, and are the following the very first imp

Re: [Matplotlib-users] RuntimeError: could not open display

2011-09-01 Thread Benjamin Root
On Thursday, September 1, 2011, CompBio wrote: > > I'm trying to get a script to work in batch mode to produce a large number of > plots. I've got the following sequence of imports in a matplotlib Python > script: > > import matplotlib, os, sys > ... > if file_ext == 'png' : >sys.stderr.write

[Matplotlib-users] RuntimeError: could not open display

2011-09-01 Thread CompBio
I'm trying to get a script to work in batch mode to produce a large number of plots. I've got the following sequence of imports in a matplotlib Python script: import matplotlib, os, sys ... if file_ext == 'png' : sys.stderr.write('Using PNG output format\n') matplotlib.use('agg') elif fi

[Matplotlib-users] Can't render the \dagger LaTex symbol

2011-09-01 Thread Alejandro Weinstein
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 rais

Re: [Matplotlib-users] py2app setup.py example?

2011-09-01 Thread Robert Sudwarts
Apologies -- I should have read the subject line! :) On 1 September 2011 14:00, Carlos Grohmann wrote: > Hello Robert, > > Thank you for your kind response, but I'm looking into py2app, for Mac OSX, > and it is a bit different than py2exe. I do have a py2exe script working > (lots of examples ar

Re: [Matplotlib-users] py2app setup.py example?

2011-09-01 Thread Carlos Grohmann
Hello Robert, Thank you for your kind response, but I'm looking into py2app, for Mac OSX, and it is a bit different than py2exe. I do have a py2exe script working (lots of examples around), but I'm still a bit lost on the Mac-related stuff. cheers Carlos On Thu, Sep 1, 2011 at 05:34, Robert Su

Re: [Matplotlib-users] py2app setup.py example?

2011-09-01 Thread Robert Sudwarts
Hi Carlos, It's a bit tricky giving you a complete example as the specifics will vary considerably depending on which versions of python, matplotlib & wx you're using: I'd point you toward the wxPyWiki page at: http://wiki.wxpython.org/py2exe-python26 which gives a pretty sound example based on