|
From: pau <all...@gm...> - 2006-08-27 14:33:00
|
Hi Hans-Bernard,
I did what you suggested and do the extra-gawk thing out of gnuplot. Now for
each data file named "Splotch4_0010_part.asc" I have an additional one
containing only the information of the row I looked for with gawk:
"Splotch4_0010_part_b.asc"
Now it turns out that I am so silly that I don't know how to tell the script
to plot first Splotch4_0010_part.asc and then immediately
"Splotch4_0010_part_b.asc" :(
It must be easy but I am not good at all in scripting... The script looks
like
------------------------------------------
for f in Splotch4* ; do
eps_file=`basename $f .asc.gz`.eps
gnuplot <<EOF
unset key
set xrange [-15:15]
set yrange [-15:15]
set xlabel "X (pc)" font "Helvetica,12"
set ylabel "Y (pc)" font "Helvetica,12"
set terminal postscript eps enhanced ; set output "$eps_file"
set pointsize 1
plot "< zcat $f" using 3:4 with dots lt 8, plot "< zcat $f | gawk -v
NAME=60001 '/AS/ {TIME=$4} $1==NAME {print TIME,$2,$3,$4,$5,$6,$7,$8,$11;
exit}'" using 3:4 with points pt 6 lt -1
unset output
EOF
done
---------------------------------
The part containing "plot "< zcat $f | gawk -v NAME=60001 '/AS/ {TIME=$4}
$1==NAME {print TIME,$2,$3,$4,$5,$6,$7,$8,$11; exit}'" using 3:4 with points
pt 6 lt -1"
should be replaced with "gnuplot please now plot the file
Splotch4_0010_part_b.asc before you plot the following one,
Splotch4_0011_part.asc"
I know this is not a gnuplot question, but since you've been in this story
since the beginning and you seem to be good at scripting too, I resort to
you :)
heeelp! I'm very close to the final result!
--
View this message in context: http://www.nabble.com/automated-plotting-tf2160717.html#a6007346
Sent from the Gnuplot - User forum at Nabble.com.
|