summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-12-26 15:04:56 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-12-26 15:04:56 +0100
commited67120e03fda848c4787871ea957564d8c4e8bb (patch)
tree2a9425b8ff3f9b0389733781bdfbcf32f09ac456
parent1183f454ff5bdec9fcafb6cbacf2c8838bc8e18b (diff)
Add mpplot (plotting for mplog)
-rwxr-xr-xmpplot/loop8
-rw-r--r--mpplot/plot12
2 files changed, 20 insertions, 0 deletions
diff --git a/mpplot/loop b/mpplot/loop
new file mode 100755
index 0000000..51840db
--- /dev/null
+++ b/mpplot/loop
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+while true; do
+ tail -n 2000 /tmp/wibble.log | head -n 1999 > /tmp/wibble.tail
+ gnuplot plot
+ convert /tmp/mp.ps /tmp/mp.png
+ date
+done
diff --git a/mpplot/plot b/mpplot/plot
new file mode 100644
index 0000000..a5f1383
--- /dev/null
+++ b/mpplot/plot
@@ -0,0 +1,12 @@
+set xlabel "Time"
+set ylabel "Sensor Value"
+#set yrange [0:16000]
+
+set size 1.0, 0.6
+set terminal postscript portrait enhanced mono dashed lw 1 "Helvetica" 14
+
+set title "Sensors"
+set output '/tmp/mp.ps'
+plot '/tmp/wibble.tail' using 1:2 with lines lt 1 lc rgb "green" title "Pitch", \
+ '/tmp/wibble.tail' using 1:3 with lines lt 1 lc rgb "blue" title "Roll", \
+ '/tmp/wibble.tail' using 1:4 with lines lt 1 lc rgb "red" title "Yaw"