more gnuplotting
This commit is contained in:
parent
160b9fc49a
commit
63d71d99a7
3
.gitignore
vendored
3
.gitignore
vendored
@ -18,5 +18,6 @@ doc/*.ind
|
||||
rrdb/*.png
|
||||
serial/*.png
|
||||
|
||||
/viz/curses/t
|
||||
viz/curses/t
|
||||
viz/gnuplot/*.png
|
||||
|
||||
|
@ -127,6 +127,9 @@ Ce qui donne qunad même à réfléchir. À se demander quel savoir
|
||||
allons-nous pouvoir déduire de ces\footnote{non, c'est pas du bigdata.}
|
||||
chiffres improbables.
|
||||
(Re-)Découvrir les lois de l'inertie thermique ?
|
||||
Générer des formes d'ondes spatialisables ?
|
||||
Déplacer des petites \textit{bubulles} colorées ?
|
||||
Une histoire pour la section \pageref{detournements} ?
|
||||
|
||||
|
||||
\subsection{Archivage} \index{archivage} \label{archivage}
|
||||
@ -307,7 +310,7 @@ les températures) et se terminant par un \textit{newline}.
|
||||
|
||||
% -------------------------------------------------------------------
|
||||
|
||||
\section{Détournements}
|
||||
\section{Détournements} \label{detournements}
|
||||
|
||||
Dans le contexte myryssien, il est évident que l'aspect artistique
|
||||
doit être dès le départ pris en compte.
|
||||
|
34
viz/gnuplot/av4v-h.awk
Executable file
34
viz/gnuplot/av4v-h.awk
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/awk -f
|
||||
|
||||
BEGIN {
|
||||
flag_debut = 1;
|
||||
lasthour = 0;
|
||||
cumul = 0.0;
|
||||
compte = 0;
|
||||
}
|
||||
|
||||
# iterate over all the input lines
|
||||
{
|
||||
if (flag_debut) {
|
||||
debut = $1
|
||||
flag_debut = 0
|
||||
}
|
||||
heures = int(($1-debut) / 3600);
|
||||
if (heures == lasthour) {
|
||||
val = ($2 + $3 + $4 + $5);
|
||||
cumul += val;
|
||||
compte += 4;
|
||||
}
|
||||
else {
|
||||
val = cumul /compte;
|
||||
print heures, val;
|
||||
lasthour = heures;
|
||||
cumul = 0;
|
||||
compte = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,20 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
INFILE="../../serial/foo.dat"
|
||||
NBLINES=2000
|
||||
NBLINES=1600
|
||||
TMPFILE="/tmp/dd2data.$$"
|
||||
IMAGE="average4v.png"
|
||||
IMAGE="av4v-m.png"
|
||||
|
||||
tail -${NBLINES} ${INFILE} | ./average4v.awk > ${TMPFILE}
|
||||
|
||||
gnuplot << __EOC__
|
||||
set term png size 800,600
|
||||
set term png size 1280,420
|
||||
set output "${IMAGE}"
|
||||
set grid
|
||||
set title "Average4v"
|
||||
set xlabel "minutes"
|
||||
set ylabel "température"
|
||||
set title "Average on the last ${NBLINES} samples"
|
||||
set xlabel "Minutes"
|
||||
set ylabel "Température"
|
||||
set yrange [ 5.0 : 30.0]
|
||||
plot "${TMPFILE}" with lines
|
||||
__EOC__
|
||||
|
||||
tail -20 ${TMPFILE}
|
||||
|
||||
|
22
viz/gnuplot/plot-two.sh
Executable file
22
viz/gnuplot/plot-two.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
INFILE="../../serial/foo.dat"
|
||||
NBLINES=50000
|
||||
TMPFILE="/tmp/dd2data.$$"
|
||||
IMAGE="av4v-h.png"
|
||||
|
||||
tail -${NBLINES} ${INFILE} | ./av4v-h.awk > ${TMPFILE}
|
||||
|
||||
gnuplot << __EOC__
|
||||
set term png size 1280,420
|
||||
set output "${IMAGE}"
|
||||
set grid
|
||||
set title "Hourly average on the last ${NBLINES} samples"
|
||||
set xlabel "Heures"
|
||||
set ylabel "Température"
|
||||
set yrange [ 5.0 : 30.0]
|
||||
plot "${TMPFILE}" with lines
|
||||
__EOC__
|
||||
|
||||
cat -n ${TMPFILE} | tail -20
|
||||
|
Loading…
Reference in New Issue
Block a user