#! /bin/csh -fe
# Last edited on 1998-11-14 03:58:51 by hcgl

set file = "$1"
set file = "${file:r}"

gnuplot <<EOF
set terminal postscript
set output "${file}-fpw.ps"
plot \
  "< gawk '/^[^#]/ {print log(\$1)/log(10),(\$3==0?0:log(\$3)/log(10))}' $file.fpw" \
  using 1:2 title "freqs" \
  with impulses
quit
EOF

ghostview ${file}-fpw.ps

gnuplot <<EOF
set terminal postscript
set output "${file}-bpw.ps"
plot \
  "< gawk '/^[^#]/ {print log(\$2)/log(10),(\$3==0?0:log(\$3)/log(10))}' $file.bpw" \
  using 1:2 title "freqs" \
  with impulses
quit
EOF

ghostview ${file}-bpw.ps
