From c9e78aa11ad9f4175cf422aada9c0ec5419a178e Mon Sep 17 00:00:00 2001 From: phyto Date: Wed, 3 Apr 2019 18:36:27 +0200 Subject: [PATCH] temporary plot script --- plot.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 plot.sh diff --git a/plot.sh b/plot.sh new file mode 100755 index 0000000..f70bd20 --- /dev/null +++ b/plot.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# THIS IS A KLUDGE + + +DATAFILE="serial/foo.dat" +IMAGE="graphe.png" +TMPFILE="/tmp/tmpdata" + +tail -400 < ${DATAFILE} > ${TMPFILE} + +gnuplot << __EOC__ +set term png size 1000,700 +set output "${IMAGE}" +set ytics 2 +set xtics +set grid front +set title "* Temperatures *" +set xdata time +set timefmt "%s" +set format x "%d\n%H:%M" +set yrange [ 0.0 : 30.0 ] +plot "${TMPFILE}" using 1:3 title "ambient" with lines, \ + "${TMPFILE}" using 1:4 title " inside" with lines +__EOC__ + +display ${IMAGE} + +