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 <roger...@cs.colostate.edu> 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 at others have pointed out, your code is unnecessarily complex.  Just
> do
> 
> import matplotlib
> matplotlib.use('agg')
> import pylab
> 
> and when you call savefig, you can pass ps, eps, pdf, png or svg and
> the mpl code will choose the right backend, and never launch a GUI.
> 
> JDH
> 
> ------------------------------------------------------------------------------
> 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
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/RuntimeError%3A-could-not-open-display-tp32380449p32381652.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to