expyfun.visual.FixationDot

class expyfun.visual.FixationDot(ec, colors=('w', 'k'))[source]

A reasonable centered fixation dot.

This uses concentric circles, the inner of which has a radius of one pixel, to create a fixation dot. If finer-grained control is desired, consider using ConcentricCircles.

Parameters:
ecinstance of ExperimentController

Parent EC.

colorslist of matplotlib Colors

Color to fill the outer and inner circle with, respectively.

Returns:
fixinstance of FixationDot

The fixation dot.

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.FixationDot

Run a very basic experiment

Run a very basic experiment

Mouse click demo

Mouse click demo

Video property control

Video property control