# This gnuplot file needs to have two filenames defined: # one for the summary file, the other one for the source file. # For debugging: uncomment the following two for explicit file names. # outfilename="overview.png" # src='summaryfile' # Define the output format and size of the resulting graphic set terminal png font "DroidSansMono,11" size 800,400 set output outfilename # define time format for input set xdata time set timefmt "%m/%d/%y" # This is the source file plus a filter for the last n entries s1='< grep MDB1 '.src ; n1 = "MDB1" ; c1 = "#d8d800" s1a='< grep EAHU1 '.src ; n1a = "EAHU1" s1e='< grep MDB6E '.src ; n1e = "EMDB1" s2='< grep MDB2 '.src ; n2 = "MDB2" ; c2 = "#d000d0" s2a='< grep EAHU2 '.src ; n2a = "EAHU2" s2e='< grep MDB7E '.src ; n2e = "EMDB2" s3='< grep MDB3 '.src ; n3 = "MDB3" ; c3 = "#00ffff" s3a='< grep EAHU3 '.src ; n3a = "EAHU3" s4='< grep MDB4 '.src ; n4 = "MDB4" ; c4 = "#00ff00" s4a='< grep EAHU4 '.src ; n4a = "EAHU4" s6='< grep "MDB6 " '.src ; n6 = "MDB6" ; c6 = "#c0c0c0" s6a='< grep EAHU6 '.src ; n6a = "EAHU6" # key position set key inside reverse top left # axes index formats set format x "%m/%y" set ylabel "Consumed electrical energy (kWh)" set xlabel "Month" set grid xtics ytics set yrange [0:38000] # Do the actual plot plot s1 using 2:7 w l lt 1 lw 2 lc rgb c1 title n1, \ s1e using 2:7 w l lt 1 lw 1 lc rgb c1 title n1e,\ s1a using 2:7 w l lt 0 lw 1 lc rgb c1 title n1a,\ s2 using 2:7 w l lt 1 lw 2 lc rgb c2 title n2, \ s2e using 2:7 w l lt 1 lw 1 lc rgb c2 title n2e,\ s2a using 2:7 w l lt 0 lw 1 lc rgb c2 title n2a,\ s3 using 2:7 w l lt 1 lw 2 lc rgb c3 title n3, \ s3a using 2:7 w l lt 0 lw 1 lc rgb c3 title n3a,\ s4 using 2:7 w l lt 1 lw 2 lc rgb c4 title n4, \ s4a using 2:7 w l lt 0 lw 1 lc rgb c4 title n4a,\ s6 using 2:7 w l lt 1 lw 2 lc rgb c6 title n6, \ s6a using 2:7 w l lt 0 lw 1 lc rgb c6 title n6a