[solved] Plots generated by matplotlib to show on canvas in OpenSesame.
Hi,
I am making a psychology experiment.
I want to present random number of dots on Canvas.
Number of dots have to be changed every trial.( Maybe 1000)
I made a code to plot random number of dots with matplotlib.
But I cannot show plots on canvas.
Is there anyway for me to show plots on Canvas?
I tried to make it as an image first and bring it out to canvas, but it did not work well.
Do you guys have any Idea with this problem?
Comments
matplotlib cannot draw directly on an OpenSesame canvas, so this would indeed be the way to go. I did this once, and it worked. One quirk was that matplotlib seemed to steel the window focus, so you had to click in the OpenSesame window to continue the experiment. Other than that it worked fine. What kind of problems are you running into?
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi,
The most 'OpenSesame way' to show a plot would indeed be through canvas.image() I think; although there is a much easier and more direct way to present random dots on a canvas. In an inline_script, you could do the following:
Does that help?
Cheers,
Josh
Great!
Thanks Josh
Seo