mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-12-24 00:54:15 +02:00
b9244bdefd
- row: the "Offset" header looked very crowded; removed it - vizp: draw the x axis (0 dB) as solid black
54 lines
696 B
Bash
Executable File
54 lines
696 B
Bash
Executable File
#!/bin/sh
|
|
|
|
usage()
|
|
{
|
|
echo "usage: $0 [-f font] [-p png_file] prefix peak_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 [2404:2481]
|
|
set yrange [-20:20]
|
|
|
|
set xlabel "Frequency of test wave (MHz)"
|
|
set ylabel "Peak power (dB)"
|
|
|
|
set xzeroaxis lt -1
|
|
set mytics 2
|
|
set grid
|
|
|
|
plot "$file" using (\$1-0.5):2 with linespoints notitle
|
|
EOF
|