From: Scott Worley Date: Thu, 5 Sep 2013 07:58:13 +0000 (-0700) Subject: An example consumer of keystroke timing data X-Git-Tag: v1.0.0~6^2~1 X-Git-Url: http://git.scottworley.com/keystroke-timestamps/commitdiff_plain/a8ee901e5126f614c984ad16f6772d986f83101c?hp=-c An example consumer of keystroke timing data --- a8ee901e5126f614c984ad16f6772d986f83101c diff --git a/plot.gnuplot b/plot.gnuplot new file mode 100755 index 0000000..a8041ff --- /dev/null +++ b/plot.gnuplot @@ -0,0 +1,21 @@ +#!/usr/bin/gnuplot + +filename = "keystroke-timestamps.log" +bucket_size = 300 # Display resolution, in seconds +timezone_offset = -7 * 3600 # UTC-7, North American Pacific Daylight Time + +set timefmt "%s" +set xdata time +set grid +set autoscale fix +unset key + +plot "< awk '{ print int($1 / ".bucket_size.") }' \"".filename."\" \ + | uniq -c \ + | awk '{ print $2 * ".bucket_size.", $1 }' \ + | fill-in ".bucket_size \ + using ($1 + timezone_offset):2 with lines + +# (fill-in is https://chkno.net/fill-in ) + +pause -1 "Press enter to dismiss"