Can't add labels to multiple scale points using ratingScale

I am trying to add a rating scale to a task for participants to choose between 2 stims on the screen (one on the left, one of the right) while at the same time giving their confidence that it is their chosen stim. The further to the left a selection is made on the scale the more certain the participant is that the stim they want to pick is on the left, and the same for the right end of the scale.
To achieve this I have a scale from 1-12 with 1 indicating definitely the left stim, 12 indicating definitely the right stim, 6 indicating a guess at the left stim and 7 indicating a guess at the right stim, with the inbetween numbers weighted accordingly.

What I am struggling with is getting custom labels onto each point in the scale. The ratingScale documentation says I can either label just the ends, or I can label each point in the scale, but this is only working for me if I label just the ends.

So the below code works, and gives me a scale with a label at the left end saying ‘definitely left’ and a label at the right end saying ‘definitely right’:

confidence_slider=visual.RatingScale(win, low=1, high=12,labels=['definitely\nleft', 'definitely\nright'] , scale=None, markerStart=6.5, singleClick=False, pos=(0,-0.5), stretch=1.5, showAccept=True, showValue=False, acceptPreText='Which circle has the most dots?', acceptText='click to confirm confidence', acceptSize=2.5)

and if I artificially increase the scale to 13 so I have a middle point the below code works with a label in the middle:

confidence_slider=visual.RatingScale(win, low=1, high=13,labels=['definitely\nleft', 'middle','definitely\nright'] , scale=None, markerStart=7, singleClick=False, pos=(0,-0.5), stretch=1.5, showAccept=True, showValue=False, acceptPreText='Which circle has the most dots?', acceptText='click to confirm confidence', acceptSize=2.5)

but if I try to label each point, such as the toy example below I just get a scale with a 1 at the far left and a 12 at the far right and none of the labels given:

confidence_slider=visual.RatingScale(win, low=1, high=12,labels=['a','b','c','d','e','f','g','h','i','j','k','l'] , scale=None, markerStart=6.5, singleClick=False, pos=(0,-0.5), stretch=1.5, showAccept=True, showValue=False, acceptPreText='Which circle has the most dots?', acceptText='click to confirm confidence', acceptSize=2.5)

Ideally what I want is a 1-12 scale with labels at 1,6,7&12 so I can label ‘definitely left’, ‘definitely right’, ‘guess left’ & ‘guess right’ and I have tried this with variations of spaces, empty strings and full stops as the empty labels but every time I just get the blank scale with 1 & 12 marked. I have also tried making the scale wider and reducing the text size in case it was just that there literally wasn’t space for the labels I was giving but that didn’t do anything apart from the obvious wider scale / smaller text changes.

I am using a numbered scale as it makes it easier for me to score the ratings. I have tried using a categorical scale with choices instead of a numbered scale with labels but as this means (I believe, happy to be corrected!) I have to have a distinct visible label for each point on the scale it makes the scale visually very complicated which won’t really work when asking participants to respond quickly on each trial.

I’m using windows 7 with psychopy version 3.0.3 and have also tested it on a different machine using windows 7 with version 1.85.1 and I get the same result with both.

1 Like

Hi @JulietD, have you thought about using the new Slider component? It is really easy to get the Slider set up to how you want it. In the Slider, you select the number of ticks e.g.,
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), add the labels your want, and the Slider will automatically space them for you. Here is an example SliderExample.psyexp (4.5 KB)

I have the exact same issue using psychopy 3.2.3 on Linux: Giving the labels argument 2 or three values works, but giving it the same number of values for ticks/points does not

porcu.emanuele gave a hint how it might be done: Don’t use the label argument but instead tickMarks. That worked with numbers, but unfortunately I want to use letters, for which it throws ValueErrors.