Rating scale (that is both continuous and categorical at the same time)

I’m working on a speech perception study in which participants will hear a sound and they have to rate it as being: [X sound, sounds more like X, Y sound, sounds more like Y, or a totally different sound].

I thought of using a scale in which participants:

  • can click on the ends only if they think the sound is perfect X or perfect Y (categorical).
  • Or press anywhere on the line between X and Y to indicate that the sound is more like X or more like Y (continuous), where I can see how close it is to one end based on where the participant located the point on the line.
  • Or if the sound is different from both X and Y to be able to click on another option on the same screen that says “other sound”.
    Can I do that in Psychopy?
    Thank you,

Yes, PsychoPy is perfect for what you are describing.
You can create two sliders, one categorical and one continuous. Then, depending on a condition, show one or the other.

I created an example with 12 loops, six loops with condition 1, and 6 loops with condition 2.
I also added two sliders, one categorical and one continuous.
Each one of the conditions has three categorical and three continuous sliders:

Condtion_Type Slider_Type
1 0
1 0
1 0
1 1
1 1
1 1
2 0
2 0
2 0
2 1
2 1
2 1

Depending on the structure of your conditions, you might only use one condition, which is Slider_Type. You can change the conditions however fits your experiment.

Here’s an experiment example you can download and view:
Slider.zip (90.7 KB)

Thank you so much.
I wonder if we can label the rating scale with images instead of words for the ticks. Can we do that?

According to the docs, labels are being created as a text box. Inserting images won’t work.
I tried testing it, and if you try to insert images as your labels, you get a string declaring the class of the image.

# Make labels
        self.labelObjs = []
        if self.labels is not None:
            for n, label in enumerate(self.labels):
                # Skip blank labels
                if label is None:
                # Create textbox for each label
                obj = TextBox2(
                    self.win, label, font=self.font,
                    pos=self.labelParams['pos'][n], size=self.labelParams['size'][n], padding=self.labelParams['padding'][n], units=self.units,
                    anchor=self.labelParams['anchor'][n], alignment=self.labelParams['alignment'][n],
                    color=self._foreColor.copy(), fillColor=None, colorSpace=self.colorSpace,
                    borderColor="red" if debug else None,

You can try to find the positions of the labels and place images under the ticks. I don’t see a better solution…

If you have the knowledge and the time, you can try to change the code I showed you in the comment above (in the developer version).

Instead of assigning the label with a text box, assign it with anything (maybe not anything, but you get my point):

I wouldn’t change it unless you know it won’t create any bugs in your experiments. For example, if you know that images as labels are the only scenario you will use for the slider’s labels.

I created two images in my experiments, image and image_2.
Then all I had to do so set those images as the attributes of the labels and it works:

# Begin Routine:
slider = visual.Slider(win, ticks=(1, 2, 3, 4, 5), labels=(image, image_2))

And it looks like this:

The issue is that I need to have the instructions in Arabic, not in English. The instructions appear in Arabic without a problem but the ticks’ labels on the scale show weird symbols when I type in Arabic. So, I thought that I can use images created in Paint with Arabic text on them.

I am not exactly sure why. I think it has something to do with the font. Note that it sometimes worked and sometimes didn’t work on my machine, so make sure you check it a couple of times before declaring it a viable solution.

# Begin Routine:
slider = visual.Slider(win,labels=("السلام عليكم", "السلام عليكم", "السلام عليكم"), font="Arial")

1 Like

In the instructions at the top of the screen, the words in Arabic were correct. I managed to do that by choosing ‘Arabic’ as the language style in the Formatting tab of the text added. However, I didn’t know how to do that for the ticks’ labels on the slider.
In the first option, I tried to reverse the letters of the words, but the result was that the order of the letters was correct but they were not connected as they should be in Arabic words.
Also, as you can see in the second image, the markers on the slider are shifted out of the circles. What should I do to position them at the center of the circle?
I used the following code in ‘Begin Routine’:
slider = visual.Slider(win,flip=False,style= ‘radio’,size=(0.1,0.55), pos=(0.7,-0.06),labels=(“السلام عليكم”, “السلام عليكم”, “مالسلا”), font=“Arial”)

Are the labels okay now with the fix I sent, or it doesn’t work as intended? I got a little confused.
Are you saying that right now, the text of the label is backward?
You can place text instead of labels, it’s a pain to position, but it will work. Using Arabic is problematic without the language style.

Try to check this question about slider labels:

You can find many more questions referring to the same issue. Try to search there first; the solution is probably there :slight_smile: