better temperature hourly plot
This commit is contained in:
parent
acd1248fa5
commit
e16879a8a2
@ -10,13 +10,13 @@ NB_READ=5000
|
|||||||
./t -vv -n ${NB_READ} -d ${DEVICE} | tee -a ${DATAFILE}
|
./t -vv -n ${NB_READ} -d ${DEVICE} | tee -a ${DATAFILE}
|
||||||
|
|
||||||
gnuplot << __EOC__
|
gnuplot << __EOC__
|
||||||
set term png size 3200,640
|
set term png size 4200,640
|
||||||
set output "${IMAGE}"
|
set output "${IMAGE}"
|
||||||
set grid
|
set grid
|
||||||
set title "Temperature dans le Double Dragon 2"
|
set title "Temperature dans le Double Dragon 2"
|
||||||
set xdata time
|
set xdata time
|
||||||
set timefmt "%s"
|
set timefmt "%s"
|
||||||
set format x "%a, %H:%M:%S"
|
set format x "%d, %H:%M:%S"
|
||||||
set yrange [ 0.0 : 30.0]
|
set yrange [ 0.0 : 30.0]
|
||||||
plot "${DATAFILE}" using 1:2 title " foo" with lines, \
|
plot "${DATAFILE}" using 1:2 title " foo" with lines, \
|
||||||
"${DATAFILE}" using 1:3 title " bar" with lines, \
|
"${DATAFILE}" using 1:3 title " bar" with lines, \
|
||||||
|
@ -21,7 +21,7 @@ BEGIN {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
val = cumul /compte;
|
val = cumul /compte;
|
||||||
print heures, val;
|
print $1, val;
|
||||||
lasthour = heures;
|
lasthour = heures;
|
||||||
cumul = 0;
|
cumul = 0;
|
||||||
compte = 0;
|
compte = 0;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
INFILE="../../serial/foo.dat"
|
INFILE="../../serial/foo.dat"
|
||||||
NBLINES=50000
|
NBLINES=60000
|
||||||
TMPFILE="/tmp/dd2data.$$"
|
TMPFILE="/tmp/dd2data.$$"
|
||||||
IMAGE="av4v-h.png"
|
IMAGE="av4v-h.png"
|
||||||
|
|
||||||
@ -14,8 +14,13 @@ set grid
|
|||||||
set title "Hourly average on the last ${NBLINES} samples"
|
set title "Hourly average on the last ${NBLINES} samples"
|
||||||
set xlabel "Heures"
|
set xlabel "Heures"
|
||||||
set ylabel "Temperature"
|
set ylabel "Temperature"
|
||||||
set yrange [ 5.0 : 30.0]
|
set yrange [ 0.0 : 30.0]
|
||||||
plot "${TMPFILE}" with lines
|
|
||||||
|
set xdata time
|
||||||
|
set timefmt "%s"
|
||||||
|
set format x "%d, %H:%M"
|
||||||
|
|
||||||
|
plot "${TMPFILE}" using 1:2 title "celcius" with lines
|
||||||
__EOC__
|
__EOC__
|
||||||
|
|
||||||
cat -n ${TMPFILE} | tail -20
|
cat -n ${TMPFILE} | tail -20
|
||||||
|
Loading…
Reference in New Issue
Block a user