2019-04-04 03:36:27 +11:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# THIS IS A KLUDGE
|
|
|
|
|
|
|
|
|
|
|
|
DATAFILE="serial/foo.dat"
|
|
|
|
IMAGE="graphe.png"
|
2019-04-14 20:33:52 +11:00
|
|
|
TMPFILE="/dev/shm/tmpdata"
|
2019-04-04 03:36:27 +11:00
|
|
|
|
2019-04-14 20:33:52 +11:00
|
|
|
tail -10000 < ${DATAFILE} > ${TMPFILE}
|
2019-04-04 03:36:27 +11:00
|
|
|
|
|
|
|
gnuplot << __EOC__
|
2019-04-14 20:33:52 +11:00
|
|
|
set term png size 1650,700
|
2019-04-04 03:36:27 +11:00
|
|
|
set output "${IMAGE}"
|
|
|
|
set ytics 2
|
|
|
|
set xtics
|
|
|
|
set grid front
|
2019-04-04 04:53:15 +11:00
|
|
|
set title "* Temperatures du Phytotron *"
|
2019-04-04 03:36:27 +11:00
|
|
|
set xdata time
|
|
|
|
set timefmt "%s"
|
2019-04-04 04:53:15 +11:00
|
|
|
set format x "%b %d\n%H:%M"
|
2019-04-04 03:36:27 +11:00
|
|
|
set yrange [ 0.0 : 30.0 ]
|
2019-04-04 04:53:15 +11:00
|
|
|
plot "${TMPFILE}" using 1:3 title " inside" with lines, \
|
|
|
|
"${TMPFILE}" using 1:4 title "ambient" with lines
|
2019-04-04 03:36:27 +11:00
|
|
|
__EOC__
|
|
|
|
|
|
|
|
display ${IMAGE}
|
|
|
|
|
|
|
|
|