* /trunk/src/gpstools/doc/gnuplot.txt
[gpstools.git] / vg
blob4c37fb8bda5f5d6cf451d2131159499eeac03101
1 #!/bin/bash
3 # $Id$
4 # File ID: 58ece940-08f3-11de-ab14-000475e441b9
6 cmdl=$*
7 uuid=`suuid -w eo -t vg -c "vg $*"` || { echo vg: suuid error >&1; exit 1; }
8 if [ "$1" = "-t" ]; then
9 shift
10 (echo "# Session ID: $uuid"; gpst -o csv -rt -e -d -t "$@") | rmspcall | uniq >/tmp/vg-t.tmp
11 cat <<END >/tmp/vg-t-cmd.tmp
12 # Session ID: $uuid
13 set mouse
14 # load "/tmp/label.gnuplot"
15 set zdata time
16 # set timefmt "%Y-%m-%dT%H:%M:%SZ"
17 set timefmt "%s"
18 splot "/tmp/vg-t.tmp" using 2:3:1 w l palette
19 pause -1 "Trykk Enter..."
20 END
21 gnuplot -persist /tmp/vg-t-cmd.tmp
22 else
23 (echo "# Session ID: $uuid"; gpst -o clean -ret -d -t "$@") | rmspcall | uniq >/tmp/vg.tmp
24 cat <<END >/tmp/vg-cmd.tmp
25 # Session ID: $uuid
26 set mouse
27 # load "/tmp/label.gnuplot"
28 splot "/tmp/vg.tmp" w l palette
29 pause -1 "Trykk Enter..."
30 END
31 gnuplot -persist /tmp/vg-cmd.tmp