# Plot 16WW mains voltage, export/spill to grid and PV for a month. # Input of form (datetime Vrms exportW): #20220430T23:38Z 248.139 1.254 -2.451 #20220430T23:43Z 249.437 -1.839 -1.83 #20220430T23:48Z 249.252 0.619 -2.674 #20220430T23:53Z 248.664 0.853 -2.997 #20220430T23:58Z 249.416 0.731 -3.095 set timefmt "%Y%m%dT%H:%MZ" set datafile missing "-" set format x "%m/%d" set xdata time # Start to draw (PNG) output. #set terminal png small size 640,240 #set terminal png small size 640,160 set terminal png small size 720,180 #set terminal png small size 800,200 #set terminal png size 1600,400 set output ".work/mainsV.png" set title "16WW Mains Voltage RMS (V) and Export (W)" #set key off set key outside set key right #set key box #set lmargin 1.5 # Deliberately truncate left-most X-axis label on left as low-information. #set lmargin 0 #set rmargin 13.5 #set tmargin 0.5 #set bmargin 1.5 set grid xtics y2tics #set border 0 #set xrange [0.1:12] #set yrange [0:60] #set xtics rotate set format y "%gV" #set noytics #unset autoscale y #set y2tics set format y2 "%gW" set tics scale 3 plot ".work/mainsV.dat" \ using 1:3 title "E W" with lines axes x1y2 lw 1, \ "" using 1:4 title "PV W" with lines axes x1y2 lw 1, \ "" using 1:2 title "V" with lines lw 1