vispy.visuals.markers module#

Marker Visual and shader definitions.

class vispy.visuals.markers.MarkersVisual(scaling=False, alpha=1, antialias=1, spherical=False, light_color='white', light_position=(1, -1, 1), light_ambient=0.3, **kwargs)#

Bases: Visual

Visual displaying marker symbols.

Parameters:
posarray

The array of locations to display each symbol.

sizefloat or array

The symbol size in screen (or data, if scaling is on) px.

edge_widthfloat or array or None

The width of the symbol outline in screen (or data, if scaling is on) px.

edge_width_relfloat or array or None

The width as a fraction of marker size. Exactly one of edge_width and edge_width_rel must be supplied.

edge_colorColor | ColorArray

The color used to draw each symbol outline.

face_colorColor | ColorArray

The color used to draw each symbol interior.

symbolstr or array

The style of symbol used to draw each marker (see Notes).

scalingbool

If set to True, marker scales when rezooming.

alphafloat

The opacity level of the visual.

antialiasfloat

Antialiasing amount (in px).

sphericalbool

Whether to add a spherical effect on the marker using lighting.

light_colorColor | ColorArray

The color of the light used to create the spherical effect.

light_positionarray

The coordinates of the light used to create the spherical effect.

light_ambientfloat

The amount of ambient light used to create the spherical effect.

Notes

Allowed style strings are: disc, arrow, ring, clobber, square, diamond, vbar, hbar, cross, tailed_arrow, x, triangle_up, triangle_down, and star.

property alpha#

The opacity level of the visual.

property antialias#

Antialiasing amount (in px).

property light_ambient#

The amount of ambient light used to create the spherical effect.

property light_color#

The color of the light used to create the spherical effect.

property light_position#

The coordinates of the light used to create the spherical effect.

property scaling#

If set to True, marker scales when rezooming.

set_data(pos=None, size=10.0, edge_width=1.0, edge_width_rel=None, edge_color='black', face_color='white', symbol='o')#

Set the data used to display this visual.

Parameters:
posarray

The array of locations to display each symbol.

sizefloat or array

The symbol size in screen (or data, if scaling is on) px.

edge_widthfloat or array or None

The width of the symbol outline in screen (or data, if scaling is on) px.

edge_width_relfloat or array or None

The width as a fraction of marker size. Exactly one of edge_width and edge_width_rel must be supplied.

edge_colorColor | ColorArray

The color used to draw each symbol outline.

face_colorColor | ColorArray

The color used to draw each symbol interior.

symbolstr or array

The style of symbol used to draw each marker (see Notes).

property spherical#

Whether to add a spherical effect on the marker using lighting.

property symbol#
property symbols#