The parameter mesh should optimally be a "mesh" object (output from point_mesh function) or a list with the same structure:
D2 data frame with x and y columns and D3 data frame with x, y and z columns. See point_mesh for more information.
In that case, setting the argument tri is optional, and if it is absent, a triangulation based on the D2 element of the mesh is calculated and used in the plot.
If the input mesh contains only 3D coordinates of a point mesh in D3 element, the use of previously created triangulation (through tri argument) is necessary.
To compare results between 2D topographical plot and 3D scalp plot use the same mesh in both cases.
Be careful when choosing the argument col_range. If the amplitude in input data contains values outside the chosen range, this will cause "holes" in the resulting plot.
To compare results for different subjects or conditions, set the same values of col_range and col_scale arguments in all cases.
The default used scale is based on topographical colours with zero value always at the border of blue and green shades.
Notes:
This function focuses on visualization and does not perform any data subsetting. Users are expected to filter the data beforehand using standard dplyr verbs or pick_data function.
For correct rendering of a plot, the function requires an openGL-capable device.
Displaying the rotated scalp map using the view argument requires previous call open3d().
When specifying the coords and template at the same time, the template parameter takes precedence and the coords parameter is ignored.