psychopy.org | Reference | Downloads | Github

Specifying a ratingScale component's Scale Description using code

Hi all,

Please excuse the banal question, however I could not find an answer myself from the documentation.

I am trying to have a text with instructions on what the rating scale represents, be displayed above the rating scale itself. I would normally just use the Scale Description field of the ratingScale component, but since I want to hide the mouse, adding the single line noMouse=True to the Custom tab means all other parameters of the ratingScale need to be reconfigured manually, and I haven’t been able to find what the one is that corresponds to this scale description.

Following suggestions from older posts, I tried adding code along the lines of
self.scaleDescription = TextStim(win, text='Hello World')
(with small variations), but none worked.

Thanks in advance.

OS (e.g. Win10): Win8
PsychoPy version (e.g. 1.84.x): 1.83.04

Peeking at the docs, maybe acceptPreText ?

Or maybe scaleDescription will work, because your example wouldn’t work. You need to set scale description just to be a string, not a TextStim:

self.scaleDescription = u"Hello world"

I think you want the scale parameter, like scale=u"Hello world".

From the docs http://www.psychopy.org/api/visual/ratingscale.html : “scale: Optional reminder message about how to respond or rate an item, displayed above the line; default <low>=not at all, <high>=extremely.”