Hello,
Is it possible to draw a Matplotlib plot to the psychopy window itself, rather than to it’s own unique window? I’m currently running code that returns 4 values, I’m then closing the psychopy window and running the matplotlib code, which then opens it’s own window. I gather that they are completely different things, but I just wondered if it would be at all possible to draw the plot to the main experiment window.
Here is my matplot lib code (that runs at the end), the code previous to this simply gives me 4 values associated with variables ‘red’,‘green’,‘blue’,‘grey’. Which is why I did not insert the code here.
colors = ('red','green','blue','grey')
y_pos = np.arange(len(colors))
performance = [red,green,blue,grey]
x = plt.bar(y_pos, performance, align='center')
x[0].set_color('red')
x[1].set_color('green')
x[2].set_color('blue')
x[3].set_color('grey')
plt.xticks(y_pos, colors)
plt.ylabel('count')
plt.show()
I was thinking this might be helpful for any experiment (or anything else) that wanted to feedback performance to the user during an experiment, for example.
Cheers,
Steve