|
From: <br...@ph...> - 2006-08-24 20:07:08
|
pau wrote:
> I know how to write a small script with all the gnuplot commands for a
> SINGLE data file but I don't know how to do this for 500 files...
By not doing it from inside gnuplot, but rather from the outside. Use
whatever scripting or programming language you like to print commands
into gnuplot's standard input stream. E.g. using Bourne shell as the
scripting language, if you're on Unix, a HERE script would do most of
the job:
--- myscript.sh ---
#! /bin/sh
gnuplot <<EOF
set term gif
set output "$2"
plot "$2" using 3:4 with lines
unset output
exit
EOF
to be run as
for f in *.dat ; do
/some/where/myscript.sh "$f" `basename $f .dat`.gif ;
done
|