sleepplot stepping fixed
[mirrors/Programs.git] / c / goertzel / sleepplot.sh
CommitLineData
7cd5c7da
TM
1#!/bin/bash
2
3test -z "$1" && {
4 echo "Usage: $0 sleeplog.txt"
5 exit 23
6}
7
8size="$(tail -n 1 "$1" | cut -d . -f 1)"
9test $size -gt 3600 && size="$(( $size/10 ))" #For prolonged periods
10size="$(( 200 + ($size * 2) ))"
11
12gnuplot << EOF
13set output "$1.png"
14set terminal png size $size,200
15
16set title "Sleep motions"
17set xlabel "time"
18set ylabel "motion"
19
20set yrange [-0.5:1.5]
21
22set xdata time
23set timefmt "%s"
24#set format x "%H:%M:%S"
25
26#set y2tics 300
27#set ytics 5
28
29set grid
30
31#set pointsize 0.5
6cb3a316 32plot "$1" using 2:5 with steps;
7cd5c7da
TM
33
34EOF
35
36
37
38
This page took 0.1497 seconds and 4 git commands to generate.