Gnuplot woes.
Huaiyu Zhu
hzhu at rocket.knowledgetrack.com
Fri May 19 20:42:19 EDT 2000
I've seen similar behavior on my Linux laptop, probably because the OS does
not write out file promptly (due to apm?). Experimental result:
for i in range(10):
g.plot(something)
time.sleep(sleeptime)
works if sleeptime >=0.5, fails if sleeptime <=0.2, and partially fails in
between.
Anybody knows a cure other than sleeping half a second?
Huaiyu
On Fri, 19 May 2000 22:03:38 +0100, Jacek Generowicz <jmg at ecs.soton.ac.uk>
wrote:
>The following program:
>
>------------------------
>import Gnuplot
>import string
>
>g = Gnuplot.Gnuplot()
>g('set data style lines')
>
>command = ''
>while string.lstrip(string.rstrip(command)) !=
>'quit':
>
> g.plot( [[1,1],[2,2],[3,3],[4,4]] )
> command = raw_input('plot> ')
> g.hardcopy( 'hmm.ps' )
>-------------------------
>
>gives output like this:
>
>=========================
>plot>
>plot>
>gnuplot> plot '/usr/tmp/@32453.1' notitle
> ^
> can't read data file "/usr/tmp/@32453.1"
> line 0: (No such file or directory)
>
>
>plot>
>gnuplot> plot '/usr/tmp/@32453.2' notitle
> ^
> can't read data file "/usr/tmp/@32453.2"
> line 0: (No such file or directory)
>==========================
>
>In the minimal program shown above, the problem
>can be removed by moving the g.plot() command to
>just before the g.hardcopy() command . . . but in
>more complicated programs even this fails.
>
>I would welcome any advice,
>
>Jacek
>
>
--
Huaiyu Zhu hzhu at knowledgetrack.com
KnowledgeTrack Corporation Tel: 925 738 1000
7020 Koll Center Parkway, Suite 110 Fax: 925 738 1039
Pleasanton, CA 94566
More information about the Python-list
mailing list