expyfun.visual.ConcentricCircles

class expyfun.visual.ConcentricCircles(ec, radii=(0.2, 0.05), pos=(0, 0), units='norm', colors=('w', 'k'))[source]

A set of filled concentric circles drawn without edges.

Parameters:
ecinstance of ExperimentController

Parent EC.

radiilist of float

Radii of the circles. Note that circles will be drawn in order, so using e.g., radii=[1., 2.] will cause the first circle to be covered by the second.

posarray-like

2-element array-like with the X, Y center position.

unitsstr

Units to use. These will apply to all spatial aspects of the drawing. See check_units for options.

colorslist or tuple of matplotlib Colors

Color to fill each circle with.

Returns:
circleinstance of Circle

The circle object.

draw()[source]

Draw the fixation dot.

set_color(color, idx)[source]

Set the color of one of the circles

Parameters:
colormatplotlib Color

Color of the circle.

idxint

Index of the circle.

set_colors(colors)[source]

Set the color of each circle.

Parameters:
colorslist or tuple of matplotlib Colors

Must be of type list or tuple, and contain the same number of colors as the number of circles.

set_pos(pos, units='norm')[source]

Set the position of the circles

Parameters:
posarray-like

X, Y center of the circle.

unitsstr

Units to use. See check_units for options.

set_radii(radii, units='norm')[source]

Set the color of each circle

Parameters:
radiiarray-like

List of radii to assign to the circles. Must contain the same number of radii as the number of circles.

unitsstr

Units to use. See check_units for options.

set_radius(radius, idx, units='norm')[source]

Set the radius of one of the circles

Parameters:
radiusfloat

Radius the circle.

idxint

Index of the circle.

unitsstr

Units to use. See check_units for options.

Examples using expyfun.visual.ConcentricCircles

Run a very basic experiment

Run a very basic experiment

Mouse click demo

Mouse click demo

Video property control

Video property control