aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <guskraro@student.gu.se>2017-10-23 15:04:18 +0200
committerRobin Krahl <guskraro@student.gu.se>2017-10-23 15:04:18 +0200
commit19da02e882d4501afd1d9fba13d2365d02e130a2 (patch)
tree7ed1adb46036af81f87ae5a97cb0513dc838dd03
parent413427cfa2007c7274b2bf746bb62df935383322 (diff)
parent554af967ba70a545c04ad66a76899bb93fb0241c (diff)
downloadmidbro-19da02e882d4501afd1d9fba13d2365d02e130a2.tar.gz
midbro-19da02e882d4501afd1d9fba13d2365d02e130a2.tar.bz2
Merge branch 'livegraph'
-rwxr-xr-xbroccoli/script/livegraph.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/broccoli/script/livegraph.sh b/broccoli/script/livegraph.sh
index 1a0e511..88cd87f 100755
--- a/broccoli/script/livegraph.sh
+++ b/broccoli/script/livegraph.sh
@@ -18,7 +18,9 @@ fi
function plot() {
scp -i /home/andreas/.ssh/pasadpi_rsa -P 8022 "${SCP_EXPR}/sensor.dat" "${SCP_EXPR}/distance.dat" .
- echo "set terminal png; plot 'sensor.dat' using 0:1 with line, 'distance.dat' using 0:1 axis x1y2 with line"| gnuplot > live-tmp.png
+ tail -1000 sensor.dat > sensor-1000.dat
+ tail -1000 distance.dat > distance-1000.dat
+ echo "set terminal png; set yrange [17000:17300]; set y2range [0:300]; set ytics nomirror; set y2tics nomirror; set title 'Midbro/PASAD demo'; plot 'sensor-1000.dat' using 0:1 with line title 'sensor value', 'distance-1000.dat' using 0:1 axis x1y2 with line title 'distance'" | gnuplot > live-tmp.png
mv live-tmp.png live.png
}