--- /dev/null
+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