+# PNG output
set terminal png size 1200,400
-
out = "/home/pi/quickstart/content/posts/domotica/plot.png"
-in4 = "`date '+/home/pi/corrente/%Y/%Y_%m_%d.txt'`"
+
+# HTML output
+#set terminal canvas size 1200,400 standalone jsdir "/public/gnuplot_js/" title "Current plot"
+#out = "/var/www/html/public/current_plot.html"
+
+in = "`date '+/home/pi/trend/corrente/%Y/%Y_%m_%d.txt'`"
set output out
-stat in4 u 1 name "STATISTICA" nooutput
-integrale=STATISTICA_sum
+stat in u 1 name "STATISTICA" nooutput
+integral=STATISTICA_sum
set timefmt "%Y-%m-%dT%H:%M:%S+01:00"
set xdata time
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 label sprintf("Integrated power = %3.5g",integral) 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
+plot in u 2:1 smooth mcsplines t "" lt 8 lw 2, in u 2:1 smooth cumulative t "cumulative" lt 11 lw 2 axes x1y2
set output