From: Rich D. <dr...@in...> - 2005-04-28 00:41:43
|
Hello, I gave a colleague a matplotlib script that generated a .ps output with savefig, and was surprised when it didn't work for him. I eventually figured out that since he was a Windows user and didn't have DISPLAY set, the import of the matplotlib libraries was failing with the error in this message's subject. I eventually solved the problem by doing "matplotlib.use('PS')" before the pylab import. However, the script never tried to actually display anything, it only created the plot and did a savefig at the end. So my question is: is this "could not open display" behavior at import the way things are supposed to work, or is this a bug? It seems like it would be better to hold off on the "could not open display" error until someone actually tried to display something, and if all they did was savefigs, everything would work fine. This is on matplotlib .80. Thanks, Rich |