Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Expyriment Position and Size System

Hello,

I'm Trying to create a task using text buttons.
For that, I'm creating stimuli.TextBox items,
And plotting them on stimuli.BlankScreen.
I will measure response using exp.mouse.

I'm having trouble with the position and size of the items.
I didn't really understand the Expyriment position system.

My goal is to create the objects, so they can fit in different screens.
I tried using fractions of exp.screen.size, but it didn't work (object weren't visible).

I tried using misc.geometry.coordinates2position , but got an error:
"coordinates2position takes 1 positional argument but 2 were given".

any Ideas or explanations about positions and sizes?

Thanks.
Ron Katz

Comments

  • Hi RonKatz,

    the Expyriment coordinate system has its origin in the center. It is an absolute system, with pixels being the unit. That is, if you plot something with a x or y value that is larger than half the size of the surface you are plotting it on, it will not be visible.

    Placing objects at positions which are fractions of your screen size is a possibility.

    coordinates2position will take 1 argument which is a list (or tuple) with two elements, x and y (e.g. (100, 50)). Please see also the documentation for this function: http://docs.expyriment.org/expyriment.misc.geometry.html#expyriment.misc.geometry.coordinates2position

    I hope this helps.

    Best,
    Florian

    Florian Krause (Developer)
    http://www.expyriment.org

Sign In or Register to comment.