From: John H. <jdh...@ac...> - 2005-04-28 02:00:20
|
>>>>> "Rich" == Rich Drewes <dr...@in...> writes: Rich> I should add that we were both ssh'd into a Linux machine, Rich> he from Windows and I from Linux. So his DISPLAY was not Rich> set and mine was. When he ran the script it failed for him, Rich> but worked for me, even though the script only did a savefig Rich> and never tried to actually show() anything to a screen. Is Rich> that expected behavior? If you don't use the matplotlib.use directive, matplotlib will try and load its default backend from the rc file (http://matplotlib.sf.net/.matplotlibrc); if you haven't customized this on linux it is GTKAgg. My guess is that this is what is causing your problem. You have two choices in addition to the use directive: 1) change the default backend to a non-GUI backend in the rc file, eg "backend : PS". Copy the rc file to your HOME directory (or working directory) and edit it. 2) use a command line arg to force the backend > python myscript.py -dPS Hope this helps, JDH |