1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-22 23:04:59 +02:00
ben-wpan/usrp/sps/vizr

55 lines
768 B
Plaintext
Raw Normal View History

#!/bin/sh
usage()
{
echo "usage: $0 [-f font] [-p png_file] prefix range_file" 1>&2
exit 1
}
font=
term=
output=
while true; do
case "$1" in
-f) [ "$2" ] || usage
shift
font=$1;;
-p) [ "$2" ] || usage
shift
term="set term png"
output="set output \"$1\"";;
-*) usage;;
*)
break;;
esac
shift
done
[ "$2" ] || usage
[ "$3" ] && usage
prefix=$1
file=$2
gnuplot -persist <<EOF
$term
$output
set label "$prefix" at graph 0.03, graph 0.93 font "$font,22"
set xrange [-2.5:2.5]
set yrange [-70:0]
set mxtics 10
set mytics 2
set grid
set xlabel "MHz from nominal frequency of test wave"
plot "$file" using 1:4 with lines title "max" lt 2, \
"$file" using 1:3 with lines title "avg" lt 3, \
"$file" using 1:2 with lines title "min" lt 1
EOF