From: Giulio Maestrini Date: Sat, 5 Nov 2022 20:46:37 +0000 (+0100) Subject: Aggiunto script gnuplot per integratore corrente X-Git-Url: https://git.devmsg.it/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92d99a645d0336d64788f26b5229436c5a01604e;p=giulio%2F.git Aggiunto script gnuplot per integratore corrente --- diff --git a/arduino/current_plot.gnuplot b/arduino/current_plot.gnuplot new file mode 100755 index 0000000..d40eda3 --- /dev/null +++ b/arduino/current_plot.gnuplot @@ -0,0 +1,24 @@ +set terminal png size 1200,400 + +out = "/home/pi/quickstart/content/posts/domotica/plot.png" +in4 = "`date '+/home/pi/trend/corrente/%Y/%Y_%m_%d.txt'`" + +set output out + +stat in4 u 1 name "STATISTICA" nooutput +integrale=STATISTICA_sum + +set timefmt "%Y-%m-%dT%H:%M:%S+01:00" +set xdata time +set ylabel "current absorption [arb. unit]" +set ytics 1 nomirror tc lt 8 font ",13" +set xtics rotate +set tmargin 3 +set label sprintf("Integrated power = %3.5g",integrale) at graph 0.4,1 offset 0,2 +set grid +set y2label "cumulative" +set y2tics 300 tc lt 11 font ",11" +set key left +plot in4 u 2:1 smooth mcsplines t "" lt 8 lw 2, in4 u 2:1 smooth cumulative t "cumulative" lt 11 lw 2 axes x1y2 + +set output