From: John H. <jd...@gm...> - 2011-09-01 18:27:53
|
On Thu, Sep 1, 2011 at 1:23 PM, CompBio <rog...@cs...> 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 |