Running total / bar chart in the Iowa Gambling Task

David McFarlane mcfarla9 at msu.edu
Thu Jun 19 19:46:40 UTC 2008


Dina,

>At the moment, I'm programming the Iowa Gambling Task in e-prime.
>I need to include feedback (visual bar-chart) which has to be
>displayed on every trial,
>looking similar to the one from the Iowa at the top of the screen, so
>basically a double
>green/red bar.
>The bar-chart should be continuously visible on the screen and will
>vary per trial.
>Is it possible to display a continuous changing visual bar chart in e-
>prime?

To add a bar chart, you probably want to use slides.  If you are very 
careful with frame sizes you might be able to add new screens without 
overwriting the bar graph, otherwise just add the bar graph as a 
slide element wherever you need it.

Here is how I created a simple bar display for one program.  On a 
SlideImage, I added an empty text sub-object.  On that sub-object I 
made the BackColor something visible (e.g., red), gave it some 
constant width, then made the height an attribute reference (e.g., 
[BarHt]).  Then I had to add some inline script using c.SetAttrib to 
set BarHt as appropriate each time.  That made a variable height bar, 
but you will have to work out the math details yourself.

To add a frame around the variable height bar, I added another empty 
text sub-object.  I made it the same width as the bar, set its height 
to the maximum bar height, gave it a positive border width, and set 
its BackStyle to transparent.  I superimposed it on the bar, and set 
its layer position to in front of the bar.  Voila, a nice 
variable-height bar in a fixed frame.

-- David McFarlane, Professional Faultfinder


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list