Add a vector field overlay
Usage
add_vector_layer(
x,
vectors,
vertices = NULL,
scale = NULL,
color = "red",
alpha = 0.8,
lwd = 1.5,
hemi = c("both", "left", "right")
)Arguments
- x
A
"neurosurf_plot"object.- vectors
Matrix (n x 3) of XYZ vectors or a list with
left/rightmatrices. When supplying a single matrix for both hemispheres, rows are split left-to-right to match the vertex ordering.- vertices
Optional vector or list of vertex ids matching the rows of
vectorswhen defined on a subset of vertices. For both hemispheres, supply a list to avoid ambiguity.- scale
Optional numeric scalar. If
NULL, a heuristic scale is derived from the mesh extent and vector magnitudes.- color
Colour for the vectors (single value or vector).
- alpha
Numeric in \([0,1]\) for vector opacity.
- lwd
Numeric line width for the glyphs.
- hemi
One of
"both","left", or"right"when a singlevectorsmatrix is provided.