Browse Source

temporary plot script

phyto 1 year ago
parent
commit
c9e78aa11a
1 changed files with 29 additions and 0 deletions
  1. 29
    0
      plot.sh

+ 29
- 0
plot.sh View File

@@ -0,0 +1,29 @@
1
+#!/bin/bash
2
+
3
+#           THIS IS A KLUDGE 
4
+
5
+
6
+DATAFILE="serial/foo.dat"
7
+IMAGE="graphe.png"
8
+TMPFILE="/tmp/tmpdata"
9
+
10
+tail -400 < ${DATAFILE} > ${TMPFILE}
11
+
12
+gnuplot << __EOC__
13
+set term png 	size 1000,700
14
+set output 	"${IMAGE}"
15
+set ytics	2
16
+set xtics	
17
+set grid	front
18
+set title	"* Temperatures *"
19
+set xdata 	time
20
+set timefmt 	"%s"
21
+set format x 	"%d\n%H:%M"
22
+set yrange [ 0.0 : 30.0 ]
23
+plot	"${TMPFILE}" using 1:3 title "ambient" with lines, \
24
+	"${TMPFILE}" using 1:4 title " inside" with lines
25
+__EOC__
26
+
27
+display ${IMAGE}
28
+
29
+

Loading…
Cancel
Save