       layout: layout
     plotly.plot data, graphOptions, (err, msg) ->
       if err then console.error error
+
+    # Plot the accuracy with respect to time. (i.e. we are interesting in
+    # determining if accuracy increases with the amount of time the user takes
+    # to complete the experiment.) This will be a scatter-plot, with eye-input
+    # task duration (sum of button and blink) as the x axis and accuracy as the
+    # y-axis.
+    for inputMode, m in [
+      userMeanEyeAccuracy,
+      userKeypressEyeAccuracy,
+      userBlinkAccuracy
+      userMouseAccuracy]
+      data =
+        x: []
+        y: []
+        type: 'scatter'
+        mode: 'markers'
+      for meanAccuracy, i in userMeanEyeAccuracy
+        time = times[i]
+        switch m
+          when 0
+            title = 'SUI Accuracy vs. Mean Eye Task Duration'
+            filename = 'SUI-Accuracy-vs-Time-Mean-Eye'
+            taskDuration = time.s.b.duration + time.s.k.duration
+          when 1
+            title = 'SUI Accuracy vs. Eye Keypress Task Duration'
+            filename = 'SUI-Accuracy-vs-Time-Keypress'
+            taskDuration = time.s.k.duration
+          when 2
+            title = 'SUI Accuracy vs. Eye Blink Task Duration'
+            filename = 'SUI-Accuracy-vs-Time-Blink'
+            taskDuration = time.s.b.duration
+          when 3
+            title = 'SUI Accuracy vs. Mouse Task Duration'
+            filename = 'SUI-Accuracy-vs-Time-Mouse'
+            taskDuration = time.s.m.duration
+
+        data.x.push moment.duration(taskDuration).asSeconds()
+        data.y.push meanAccuracy
+
+      layout =
+        title: title
+        xaxis:
+          title: 'Task Duration (seconds)'
+          showgird: false
+          zeroline: false
+        yaxis:
+          title: 'Accuracy'
+          rangemode: 'tozero'
+      graphOptions =
+        filename: filename
+        fileopt: "overwrite"
+        layout: layout
+      plotly.plot data, graphOptions, (err, msg) ->
+        if err then console.error error
+
+
 
 
 

        parseLogFile file, parseCb, options
      (data, filename, options, cb) ->
        suiEvents.push extractSUIEvents(data)
        cb(null)
    ], done



analyzeSUIExperiment = (files, options) ->
  suiEvents = []
  times = []

  fn = (file, done) ->
    async.waterfall [
