0

I am going to design a simple visual search task as my final term project for the Python Course.In this task participants were asked to search for the certain image (call it target) but i insert the 3 image always display the last image in the script i call it (img3).

I have no idea why can't display the three pic at the same time and in the same screen.Or might be i have to use "visual.GratingStim"code?

from psychopy import visual, core, event
img1 = visual.ImageStim(win,image="lion.jpg",\
                    color=(1,1,1), size=[0.2, 0.2], \
                    pos = (-0.25, 0))

img2 = visual.ImageStim(win,image="gazelle.jpg",\
                    color=(1,1,1), size=[0.2, 0.2], \
                    pos = (-0.25, 0))

img3 = visual.ImageStim(win,image="gazelle2.jpg",\
                    color=(1,1,1), size=[0.2, 0.2], \
                    pos = (-0.25, 0))
img1.draw()
img2.draw()
img3.draw()
win.flip()
event.waitKeys()
win.close()
Jonas Lindeløv
  • 5,442
  • 6
  • 31
  • 54
Zai-Fu Yao
  • 39
  • 6

1 Answers1

3

You are drawing the pictures on top of each other (i.e they have the same size and position values), so only the last one to be drawn (img3) will be visible.

You need to separate them spatially to make them all visible.

Michael MacAskill
  • 2,411
  • 1
  • 16
  • 28