# Plot Local Bytes monitoring power plug data against time. # Duration is expected to be in the range of minutes to days. # Input of form. #2022-10-07T14:01:01Z 2 #2022-10-07T14:02:01Z 2 #2022-10-07T14:03:01Z 2 #2022-10-07T14:04:01Z 2 #2022-10-07T14:05:01Z 2 #2022-10-07T14:06:01Z 5 #2022-10-07T14:07:02Z 3 #2022-10-07T14:08:01Z 2 #2022-10-07T14:09:01Z 2 #2022-10-07T14:10:01Z 2 set timefmt "%Y-%m-%dT%H:%M:%SZ" set datafile missing "-" set format x "%H:%M" set xdata time # MAIN FIGURE FOR DESKTOP, SVG, x1 DENSITY # 720x540 is same aspect ratio as 640x480, but scaled for EOU www figure. set terminal svg size 720,540 background rgb 'white' # 'raw' image should probably be converted with eg svgo then zopfli/brotli. set output "output.raw.svg" set title "Appliance power vs time measured by Local Bytes plug" #set key off #set key outside #set key right #set key box #set lmargin 1.5 #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:] #set xtics rotate set format y "%gW" #set format x "%gW" #set noytics #unset autoscale y #set y2tics #set format y2 "%gW" #set tics scale 3 plot "input.dat" \ using 1:2 notitle with lines