# Plot load profile based on Enphase 15-minute measurement buckets. # Damon Hart-Davis licenses this file to you # under the Apache Licence, Version 2.0 (the "Licence"); # you may not use this file except in compliance # with the Licence. You may obtain a copy of the Licence at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the Licence is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the Licence for the # specific language governing permissions and limitations # under the Licence. # # Author(s) / Copyright (s): Damon Hart-Davis 2020 # Derived from graphing/storesim/batsim1-daymean-1.txt 20201229. # Prepare graph with a command similar to: #sh script/storesim/load_profile.sh # # Consists of a mean values of key parameters for each minute of the day. # (If the cycling loads have exactly 1440 sampled then they will be steady.) # # Input format: # #00:00:00,21,67,71 #00:15:00,21,77,81 #00:30:00,21,61,65 #00:45:00,21,73,77 #01:00:00,21,84,88 #01:15:00,21,69,73 #01:30:00,21,72,76 #01:45:00,21,81,85 #02:00:00,21,71,75 # # That represents the consumption from grid in mean (rounded) watts: # time-of-day,count,mean-gross-W,mean-net-W # Input file contains comma-separated values fields set datafile separator comma # Input filename supplied as: # gnuplot -e "infilename='in.dat'" if (!exists("infilename")) infilename='.work/tmp/batsim1-daymean.dat.tmp' # Output filename supplied as: # gnuplot -e "outfilename='out.png'" if (!exists("outfilename")) outfilename='batsim1-daymean.png' # X-axis format supplied as: # gnuplot -e "xafmt='%Hh'" if (!exists("xafmt")) xafmt='%Hh' # Title if (exists("title")) set title title if (!exists("title")) set title "Load Profile" set terminal png #set terminal png size 640,480 #set terminal png size 1280,480 set output outfilename set grid #set key bottom left horizontal #set key below horizontal set xdata time set timefmt "%H:%M:%S" set format x xafmt set format y "%gW" #set style fill transparent solid 0.1 border #set style fill transparent pattern 4 border # Omit some 'bad' (-1) data values from the display. # Setting lw 2 for export W to make easier to read for colourblind. plot infilename using 1:3 title "gross W" with lines lw 2, \ "" using 1:4 title "net W" with lines