3dcfec65f9d6de53ab04f2aa7f13b04c057118ed
4 echo "Usage: $0 sleeplog.txt"
8 #Approximate size of graph
9 size
="$(tail -n 1 "$1" | cut -d . -f 1)"
10 test $size -gt 3600 && size
="$(( $size/10 ))" #For prolonged periods
11 size
="$(( 600 + $size ))"
16 set terminal png size $size,300
18 set title "Sleep motions"
26 #set format x "%H:%M:%S"
31 plot "$1" using 2:5 title "Sensor state" with steps,\
32 "" using 2:(\$6*3) title "Avg last last 10 seconds" with lines,\
33 "" using 2:(\$7*3) title "Avg last last 30 seconds" with lines,\
34 "" using 2:(\$8*3) title "Avg last last 120 seconds" with lines\
This page took 0.25968 seconds and 4 git commands to generate.