Root/usrp/sps/vizr

1#!/bin/sh
2
3usage()
4{
5    echo "usage: $0 [-f font] [-p png_file] prefix range_file" 1>&2
6    exit 1
7}
8
9
10font=
11term=
12output=
13
14while true; do
15    case "$1" in
16    -f) [ "$2" ] || usage
17        shift
18        font=$1;;
19    -p) [ "$2" ] || usage
20        shift
21        term="set term png"
22        output="set output \"$1\"";;
23    -*) usage;;
24    *)
25        break;;
26    esac
27    shift
28done
29
30[ "$2" ] || usage
31[ "$3" ] && usage
32
33prefix=$1
34file=$2
35
36gnuplot -persist <<EOF
37$term
38$output
39
40set label "$prefix" at graph 0.03, graph 0.93 font "$font,22"
41
42set xrange [-2.5:2.5]
43set yrange [-70:0]
44
45set mxtics 10
46set mytics 2
47set grid
48
49set xlabel "MHz from nominal frequency of test wave"
50
51plot "$file" using 1:4 with lines title "max" lt 2, \
52  "$file" using 1:3 with lines title "avg" lt 3, \
53  "$file" using 1:2 with lines title "min" lt 1
54EOF
55

Archive Download this file



interactive