Arrows are a subclass of line visuals, which adds the ability to put several heads on a line.
vispy.visuals.line.arrow.
ArrowVisual
Bases: vispy.visuals.line.line.LineVisual
vispy.visuals.line.line.LineVisual
Arrow visual
A special line visual which can also draw optional arrow heads at the specified vertices.
You add an arrow head by specifying two vertices v1 and v2 which represent the arrow body. This visual will draw an arrow head using v2 as center point, and the orientation of the arrow head is automatically determined by calculating the direction vector between v1 and v2.
Array of shape (…, 2) or (…, 3) specifying vertex coordinates.
The color to use when drawing the line. If an array is given, it must be of shape (…, 4) and provide one rgba color per vertex. Can also be a colormap name, or appropriate Function.
The width of the line in px. Line widths > 1px are only guaranteed to work when using ‘agg’ method.
Determines which vertices are connected by lines.
“strip” causes the line to be drawn with each vertex connected to the next. “segments” causes each pair of vertices to draw an independent line segment numpy arrays specify the exact set of segment pairs to connect.
“strip” causes the line to be drawn with each vertex connected to the next.
“segments” causes each pair of vertices to draw an independent line segment
numpy arrays specify the exact set of segment pairs to connect.
Mode to use for drawing.
“agg” uses anti-grain geometry to draw nicely antialiased lines with proper joins and endcaps. “gl” uses OpenGL’s built-in line rendering. This is much faster, but produces much lower-quality results and is not guaranteed to obey the requested line width or join/endcap styles.
“agg” uses anti-grain geometry to draw nicely antialiased lines with proper joins and endcaps.
“gl” uses OpenGL’s built-in line rendering. This is much faster, but produces much lower-quality results and is not guaranteed to obey the requested line width or join/endcap styles.
Enables or disables antialiasing. For method=’gl’, this specifies whether to use GL’s line smoothing, which may be unavailable or inconsistent on some platforms.
A (N, 4) or (N, 6) matrix where each row contains the (x, y) or the (x, y, z) coordinate of the first and second vertex of the arrow body. Remember that the second vertex is used as center point for the arrow head, and the first vertex is only used for determining the arrow head orientation.
Specify the arrow head type, the currently available arrow head types are:
stealth curved triangle_30 triangle_60 triangle_90 angle_30 angle_60 angle_90 inhibitor_round
stealth
curved
triangle_30
triangle_60
triangle_90
angle_30
angle_60
angle_90
inhibitor_round
Specify the arrow size
The arrow head color. If an array is given, it must be of shape (…, 4) and provide one rgba color per arrow head. Can also be a colormap name, or appropriate Function.
arrow_color
arrow_size
arrow_type
arrows
set_data
Set the data used for this visual