From: Giulio Maestrini Date: Sat, 5 Nov 2022 21:52:23 +0000 (+0100) Subject: Correzione path X-Git-Url: https://git.devmsg.it/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c4552adb83752bc4ce8cf3b63abc65258c02257;p=giulio%2F.git Correzione path --- diff --git a/arduino/current_plot.gnuplot b/arduino/current_plot.gnuplot index 566155a..9fbb961 100755 --- a/arduino/current_plot.gnuplot +++ b/arduino/current_plot.gnuplot @@ -1,12 +1,17 @@ +# 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 @@ -14,11 +19,11 @@ 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 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