 
# generate data to plot
#	 plot_power.py  > powerdata.dat
#
# Use gnuplot to plot data
#	 gnuplot -e "plot_data_file='powerdata'" gnup_poweruse.txt
#
# Output will be in file powerdata.png  
#
 

name=plot_data_file

set output name.".png"

set terminal png size 2600,500

#set terminal png size 1920,500
#set terminal png size 800,150

set datafile separator "\t"
set xlabel "time"
set ylabel "power"
set grid
#show mxtics
#set mxtics 10
set key off
set pointsize 0.5

set xtics rotate

set xtics 3600
set xdata  time
set timefmt "%Y-%m-%d %H:%M:%S"
set format x "%a %b %d %H:%M"

# set xrange [ "2014-03-04 00:00:00" :  ] 

set style data lines 
set autoscale y 

set title "Power Use"

plot name.".dat" using 1:3 t "inbound" w lines, name.".dat" using 1:5 t "outbound" 
