|
From: Michael H. <mh...@al...> - 2011-11-19 13:56:28
|
On 11/18/2009 11:15 AM, zhangwei02 wrote:
> [...]
> gnuplot: unable to open display ''
> gnuplot: X11 aborted.
> line 0: Bad format character
Why do you think that your problem is related to setting a date format?
Can you get your script to plot *anything*?
It looks to me like gnuplot is trying to plot something to an X11 window
(even though your goal seems to be only to output a PNG file). But it
fails, perhaps because your DISPLAY variable is not set or because you
are running this script in a non-X11 environment.
I'm not sure why gnuplot is trying to output to an X11 window. You
don't seem to generate any output before resetting the terminal type to
png. Try loading the same commands (the ones output by Gnuplot.py's
debug=1 mode) directly into gnuplot in the same environment where the
script is run, to see whether it gives the same error. If so, try
running the same commands but without the "set terminal x11" line and
see if the error goes away. If it goes away, then you might be able to
work around the problem by setting your "default_term" to something
other than x11 using something like
import Gnuplot
Gnuplot.gp.GnuplotOpts.default_term = 'dumb'
before you create the Gnuplot object.
Please let us know what you find out.
Michael
--
Michael Haggerty
mh...@al...
http://softwareswirl.blogspot.com/
|