|
From: <HBB...@t-...> - 2007-05-14 20:00:54
|
ulixes wrote:
> i have a folder with about 1000 .dat files and would have to do the
> following with all of them:
>
> set out "data1.png"
> plot "z2.dat" u 1:4 w l lt 3, "data1.dat" u 1:(6.6E-18*$2) w l lt 4
>
> where data1 is the name of a single file. It is important that the png
> picture is saved under the name of original file.
A classical example for scripting gnuplot from the outside. E.g. if you
choose the shell as the outside scripting language, something like the
follow should do it:
for f in *.dat ; do
out=`basename $f .dat`.png
gnuplot <<\EOF
set term png
set out "$out"
plot "z2.dat" u 1:4 w l lt 3, "$f" u 1:(6.6e-18*$2) w l lt 4
unset out
EOF
done
|