bfe15f4caffa4dc2f6f0c89e3d9fe942a7f3900f
[fw/altos] / src / test / plotmm
1 #!/bin/sh
2
3 case $# in
4 1)
5         file="$1"
6         title="$1"
7         ;;
8 2)
9         file="$1"
10         title="$2"
11         ;;
12 *)
13         echo "Usage: $0 <data-file> <title>"
14         exit 1
15 esac
16
17 gnuplot -persist << EOF
18 set ylabel "altitude (m)"
19 set y2label "angle (d)"
20 set xlabel "time (s)"
21 set xtics border out nomirror
22 set ytics border out nomirror
23 set y2tics border out nomirror
24 set title "$title"
25 plot "$file" using 1:3 with lines axes x1y1 title "raw height",\
26 "$file" using 1:7 with lines axes x1y2 title "angle"
27 EOF