DD2-monitor/plot.sh
2019-04-14 11:33:52 +02:00

30 lines
534 B
Bash
Executable File

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