vispy.visuals.line_plot module#

class vispy.visuals.line_plot.LinePlotVisual(data=None, color='k', symbol=None, line_kind='-', width=1.0, marker_size=10.0, edge_color='k', face_color='w', edge_width=1.0, connect='strip')#

Bases: CompoundVisual

Visual displaying a plot line with optional markers.

Parameters:
dataarray-like

Arguments can be passed as (Y,), (X, Y), (X, Y, Z) or np.array((X, Y)), np.array((X, Y, Z)).

colorinstance of Color

Color of the line.

symbolstr

Marker symbol to use.

line_kindstr

Kind of line to draw. For now, only solid lines ('-') are supported.

widthfloat

Line width.

marker_sizefloat

Marker size. If size == 0 markers will not be shown.

edge_colorinstance of Color

Color of the marker edge.

face_colorinstance of Color

Color of the marker face.

edge_widthfloat

Edge width of the marker.

connectstr | array

See LineVisual.

**kwargskeyword arguments

Argements to pass to the super class.

See also

LineVisual, MarkersVisual

Examples

All of these syntaxes will work:

>>> LinePlotVisual(y_vals)
>>> LinePlotVisual(x_vals, y_vals)
>>> LinePlotVisual(xy_vals)
set_data(data=None, **kwargs)#

Set the line data

Parameters:
dataarray-like

The data.

**kwargsdict

Keywoard arguments to pass to MarkerVisual and LineVisal.