vispy.visuals.linear_region module

class vispy.visuals.linear_region.LinearRegionVisual(pos=None, color=[1.0, 1.0, 1.0, 1.0], vertical=True, **kwargs)

Bases: vispy.visuals.visual.Visual

Infinite horizontal or vertical region for 2D plots.

Parameters
poslist, tuple or numpy array

Bounds of the region along the axis. len(pos) must be >=2.

colorlist, tuple, or array

The color to use when drawing the line. It must have a shape of (1, 4) for a single color region or (len(pos), 4) for a multicolor region.

vertical:

True for drawing a vertical region, False for an horizontal region

property color
property is_vertical
property pos
set_data(pos=None, color=None)

Set the data

Parameters
poslist, tuple or numpy array

Bounds of the region along the axis. len(pos) must be >=2.

colorlist, tuple, or array

The color to use when drawing the line. It must have a shape of (1, 4) for a single color region or (len(pos), 4) for a multicolor region.