[Matplotlib-users] Generating and saving figures without actually displaying them

2007-05-18 Thread kaushik.ghose
Hello,

I want to run a python program on a remote machine via ssh. It generates 
figures and saves them to files. I don't need/want to see the figures as 
they are being generated and saved.

When I do this on the remote machine (which is running linux) I get a 
display error

_tkinter.TclError: no display name and no $DISPLAY environment variable

Is there a way to disable drawing on the device and just have 'virtual' 
drawing to a file?

thanks!
-Kaushik

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


Re: [Matplotlib-users] Generating and saving figures without actually displaying them

2007-05-18 Thread Christopher Barker
Darren Dale wrote:
 On Friday 18 May 2007 12:39:29 pm kaushik.ghose wrote:
 Is there a way to disable drawing on the device and just have 'virtual'
 drawing to a file?
 
 Try using the agg backend

Which you can do by either:

  * changing the default backend in .matplotlibrc

or

  * Putting:
import matplotlib
matplotlib.use(Agg)

at the top of your script, BEFORE any mpl calls, including import 
pylab, if indeed you import pylab at all.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]

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