how can I draw pie charts in PsychoPy Builder -


i want create half pie chart use in existing builder script , i'm not sure how go it. (its implement speedometer)

does have suggestions?

i realise i'll need dip python code.

this old posting in google groups https://groups.google.com/forum/#!topic/psychopy-users/jcns7ztuvlm gives sample code utilising pylab couldn't work when dropped builder.

thanks,

i've worked out how here's method record.

# create 1st sector - use **ori** parameter control bearing  # starts on (0 vertical) rad1 = visual.radialstim( win=win, name='rad1', color=[1,-1,-1],     angularcycles = 0, radialcycles = 0, radialphase = 0.5, colorspace = 'rgb',      ori= -90.0, pos=(0.5, -0.3), size=(0.3,0.3),  visiblewedge=(0.0, 135.0) ) rad1.draw()  #now draw sector next using **ori** again line them rad2 = visual.radialstim( win=win, name='rad1', color=[-1,1,-1],     angularcycles = 0, radialcycles = 0, radialphase = 0.5, colorspace = 'rgb',      ori= 45.0, pos=(0.5, -0.3), size=(0.3,0.3),  visiblewedge=(0.0, 45.0) ) rad2.draw() 

this works fine in builder, dropping code segment , knowing builder uses window called win

note uses default mode size (-1 1) different on different screen sizes. may want change cm (and calibrate monitor) if want round.

thanks jon p suggestion (via google groups) use radialstim)


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -