           thisMean = mean[input][btnSize][margin]
           thisMedian = median[input][btnSize][margin]
           thisSum = sum[input][btnSize][margin]
-          thisAccuracy = accurracy[input][btnSize][margin]
+          thisAccuracy = accuracy[input][btnSize][margin]
 
           console.log "    Margin: #{margin}"
           console.log "       Mean:      #{thisMean.correct} / #{thisMean.incorrect}"
           console.log "       Median:    #{thisMedian.correct} / #{thisMedian.incorrect}"
           console.log "       Sum:       #{thisSum.correct} / #{thisSum.incorrect}"
-          console.log "       Accurracy: #{thisAccuracy}"
+          console.log "       Accuracy: #{thisAccuracy}"
+
+    # Plot the accuracy of each input mode.
+    for input of accuracy
+      traces = {}
+      for btnSize of accuracy[input]
+        if +btnSize < 10 then continue
+        for margin of accuracy[input][btnSize]
+          traces[margin] ?=
+            x: []
+            y: []
+            type: 'scatter'
+            name: "#{Math.round(margin)}px Margin"
+          traces[margin].x.push Math.round(+btnSize)
+          traces[margin].y.push accuracy[input][btnSize][margin]
+
+      data = []
+      for k, trace of traces
+        data.push trace
+
+      inputName = mapInputNames(input)
+      layout =
+        title: "SUI #{inputName} Plot"
+        xaxis:
+          title: 'Button Size (pixels)'
+          showgird: false
+          zeroline: false
+          autorange: 'reversed'
+        yaxis:
+          title: 'Accuracy'
+          rangemode: 'tozero'
+      graphOptions =
+        filename: "SUI-#{inputName}-Plot"
+        fileopt: "overwrite"
+        layout: layout
+      plotly.plot data, graphOptions, (err, msg) ->
+        if err then console.error error
+
+    # Plot all input modes compared to each other... taking the mean accuracy
+    # over the margin size.
+    traces = {}
+    for input of accuracy
+      inputName = mapInputNames(input)
+      traces[input] =
+        x: []
+        y: []
+        type: 'scatter'
+        name: "#{inputName}"
+      for btnSize of accuracy[input]
+        m = []
+        for margin of accuracy[input][btnSize]
+          m.push accuracy[input][btnSize][margin]
+        if btnSize < 10 then continue
+        traces[input].x.push btnSize
+        traces[input].y.push mathjs.mean m
+
+    data = []
+    for k, trace of traces
+      data.push trace
+
+    layout =
+      title: "SUI Input Comparison Plot"
+      xaxis:
+        title: 'Button Size (pixels)'
+        showgird: false
+        zeroline: false
+        autorange: 'reversed'
+      yaxis:
+        title: 'Mean Accuracy Over Margin Size'
+        rangemode: 'tozero'
+    graphOptions =
+      filename: "SUI-Input-Comparison-Plot"
+      fileopt: "overwrite"
+      layout: layout
+    plotly.plot data, graphOptions, (err, msg) ->
+      if err then console.error error
+
+
+
 
 
 
 analyzeExperimentTimes = (files, options) ->
   times = []
+  trialDurations = []
 
   fn = (file, done) ->
     async.waterfall [

  .option('-C, --count', 'prints the count of the cooresponding events')
  .option('-j, --json', 'print output as JSON')
  .option('-s, --csv', 'print output as CSV')
  .action(parseArgs)

program.parse(process.argv)

async   = require 'async'
moment  = require 'moment'
mathjs  = require 'mathjs'
plotly  = require('plotly')('joshua.toenyes','4u1jcbprmz')


mapExperimentNames = (e) ->
