#!/usr/bin/env gnuplot # Data from stdin, .png to stdout. # # Plot output of occLRH script consisting of space-separated columns of: # ISOtimestamp occupancy(%) light(%) RH% # # 2014-12-29T17:43:41Z 9 - - # 2014-12-29T17:47:41Z - 12.5625 - # 2014-12-29T17:55:41Z 0 - - # 2014-12-29T17:55:41Z - - 12 # # Assumed usually intra-day, so hours more useful than date. # set timefmt "%Y-%m-%dT%H:%M:%SZ" # Could select more detailed timestamp for intra-day data periods. #set format x "%H" set format x "%d" #set format x "%m/%d" set xdata time #set terminal dumb set terminal png size 1280,480 #set output ".work/valveAndTemps.L.out.png" set title "Occupancy vs RH%" #set key outside #set key right set key left #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 yrange [0:100] set noytics set y2tics set format y "%g%%" set format y2 "%g%%" #set tics scale 3 plot "/proc/self/fd/0" \ using 1:2 title "Occ" with lines axes x1y1 lw 1, \ "" using 1:3 title "RHOcc" with points axes x1y2 lw 1, \ "" using 1:4 title "RH%" with lines axes x1y2 lw 2