Root/usrp/sps/vizp

Source at commit 49e7c83796bc04941e9dbcec69bc0751563ff4d4 created 2 years 6 months ago.
By Werner Almesberger, atusb/: use ""VDD" symbol from kicad-libs
1#!/bin/sh
2
3usage()
4{
5    echo "usage: $0 [-f font] [-p png_file] prefix peak_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 [2404:2481]
43set yrange [-20:20]
44
45set xlabel "Frequency of test wave (MHz)"
46set ylabel "Peak power (dB)"
47
48set xzeroaxis lt -1
49set mytics 2
50set grid
51
52plot "$file" using (\$1-0.5):2 with linespoints notitle
53EOF
54

Archive Download this file



interactive