[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: synchronization of octave with gnuplot?
From: |
Mike Miller |
Subject: |
Re: synchronization of octave with gnuplot? |
Date: |
Thu, 2 Dec 2004 13:35:26 -0600 (CST) |
On Thu, 2 Dec 2004, Thorsten Meyer wrote:
in an octave script I generate several gnuplot plots, export them to
postscript and do some postprocessing on the resulting eps files with a
awk script that is started via system statements from octave. Now it
seems that octave does not wait for gnuplot to finish the individual
plots. So at some point in the octave script, octave starts the awk
postprocessor on an eps file that has not been generated yet. My
workaround has been sleep statements between the plotting and the
postprocessing commands in the script. However, depending on the number
and complexity of the plots it can take up to several seconds for
gnuplot to catch up. Obviously, I would not like to add "sleep(10)" to
all my plot sequences just to make sure.
My question: is there a way to actively synchronize octave with gnuplot,
i.e. force octave to wait until gnuplot has finished a particular plot
command?
When you write "octave starts the awk postprocessor on an eps file that
has not been generated yet" do you mean that the file does not exist or
that the file is not fully generated?
It is possible to put an 'if' statement in your script to have it either
"sleep(1)" or execute the awk code depending on the existence of a file or
the existence of an ending element in a file tail.
Mike
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------