Results 1 to 2 of 2

Thread: graphing of results

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222

    graphing of results

    I'm at a loss, as i don't know how to graph these results to get a useful view of them.

    the data is for somebody typeing 'ionlyread':

    KeyDOWN:,73, 00:22:31.288,i
    KeyUP:,73, 00:22:31.368,i
    KeyDOWN:,79, 00:22:31.568,o
    KeyUP:,79, 00:22:31.668,o
    KeyDOWN:,78, 00:22:31.688,n
    KeyUP:,78, 00:22:31.768,n
    KeyDOWN:,76, 00:22:31.859,l
    KeyUP:,76, 00:22:31.899,l
    KeyDOWN:,89, 00:22:32.19,y
    KeyUP:,89, 00:22:32.89,y
    KeyDOWN:,82, 00:22:32.359,r
    KeyDOWN:,69, 00:22:32.419,enter
    KeyUP:,69, 00:22:32.479,enter
    KeyUP:,82, 00:22:32.499,r
    KeyDOWN:,65, 00:22:32.519,a
    KeyDOWN:,68, 00:22:32.580,d
    KeyUP:,65, 00:22:32.590,a
    KeyUP:,68, 00:22:32.670,d
    KeyDOWN:,13, 00:22:32.830,enter
    KeyUP:,13, 00:22:33.40,enter

    this tells me when they pressed the key down and when it was released, also in which order the keys were pressed.

    I need to be able to see the dwell times (amount of time a key is held down for) and alsothe latency (amount of time between sucessive key strokes.) they do not nessercerily have to be on the same graph, but for either how would i go about graphing them?!

    Any ideas on how i should/could do this to get some meaniingful data!?

    cheers in advance for any advice ro let me know if i need to explain further!


    Andy

  2. #2
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    hi andy
    I am assuming that u are ok with getting the time differences etc. If not then pls post again and i will show u how to get the relevant data from ur list. here is some basic code that shows u how to graph using picture box. u can modify it as much as u like but this just gives u the basic idea.
    Regards
    Stuart
    VB Code:
    1. Option Explicit
    2.  
    3. 'Dont worry about this. I have only used variants so that i could
    4. 'load dummy data using the Array() Function. U would use strings
    5. 'and doubles
    6. Dim Letters()
    7. Dim Dwell()
    8. Dim Latency()
    9. Private Const Scaling As Single = 1000
    10.  
    11. Private Sub Form_Load()
    12.     'Load dummy data.. u would read from ur data and put into arrays
    13.     ReDim Letters(8)
    14.     ReDim Dwell(8)
    15.     ReDim Latency(8)
    16.     Letters = Array("i", "r", "e", "a", "d", "o", "n", "l", "y")
    17.     Dwell = Array(0.12, 0.08, 0.22, 0.02, 0.01, 0.14, 0.15, 0.08, 0.13)
    18.     Latency = Array(0.8, 0.4, 0.2, 0.6, 0.5, 0.09, 0.25, 0.8, 0.13)
    19.  
    20.     Picture1.Scale (0, Scaling)-(Scaling, 0) 'Scale pic box
    21.     Picture1.AutoRedraw = True
    22. End Sub
    23.  
    24. Private Sub Command1_Click()
    25.     Dim lCounter As Long
    26.    
    27.     With Picture1
    28.         .CurrentX = 0: .CurrentY = 0
    29.         For lCounter = 0 To 8
    30.             Picture1.Line -(lCounter * 100, Dwell(lCounter) * Scaling), vbRed
    31.         Next
    32.    
    33.         .CurrentX = 0: .CurrentY = 0
    34.         For lCounter = 0 To 8
    35.             Picture1.Line -(lCounter * 100 + 50, Latency(lCounter) * Scaling), vbBlue
    36.         Next
    37.    
    38.         .CurrentY = 1000
    39.         For lCounter = 0 To 8
    40.             .CurrentX = lCounter * 100
    41.             Picture1.Print Letters(lCounter);
    42.         Next
    43.    
    44.     End With
    45. End Sub
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width