Files
lammps/tools/xmgrace/plotthermodata.awk
athomps 09c9148250 Added xmgrace folder
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10817 f3b2605a-c512-4ea7-a41b-209d697bcdaa
2013-09-20 16:20:55 +00:00

19 lines
414 B
Awk
Executable File

#!/sw/bin/awk -f
# Usage: ./plotthermodata.awk log.lammps | xmgrace -nxy -
BEGIN {
if ( stepnum == 0 ) stepnum = 1 # if unset, pick first set of output
print "@xaxis label \"Time Step\""
}
/Step/ {
num += 1
if ( num != stepnum ) next
n = 0
for (i=2; i<=NF; i++) {
print "@s" n, "legend \"" $i "\""
n += 1
}
}
/Step/,/step/ { if ( $0 ~ /[sS]tep/ ) next; else print }