]> git.scottworley.com Git - keystroke-timestamps/blob - plot.gnuplot
Accept short options
[keystroke-timestamps] / plot.gnuplot
1 #!/usr/bin/gnuplot
2
3 filename = "keystroke-timestamps.log"
4 bucket_size = 300 # Display resolution, in seconds
5 timezone_offset = -7 * 3600 # UTC-7, North American Pacific Daylight Time
6
7 set timefmt "%s"
8 set xdata time
9 set grid
10 set autoscale fix
11 unset key
12
13 plot "< awk '{ print int($1 / ".bucket_size.") }' \"".filename."\" \
14 | uniq -c \
15 | awk '{ print $2 * ".bucket_size.", $1 }' \
16 | fill-in ".bucket_size \
17 using ($1 + timezone_offset):2 with lines
18
19 # (fill-in is https://chkno.net/fill-in )
20
21 pause -1 "Press enter to dismiss"