Create a surface plot specification
Arguments
- lh, rh
Either
SurfaceGeometryobjects or file paths that can be read byread_surf_geometry. At least one must be provided.- views
Character vector of named views to display for each hemisphere. Valid values include
"lateral","medial","ventral","dorsal","anterior", and"posterior". Defaults toc("lateral","medial").- layout
One of
"grid","row", or"column"controlling how views and hemispheres are arranged.- mirror_views
Logical; if
TRUE, reverse the order of the right hemisphere views for"row"and"column"layouts so that they mirror the left hemisphere.- flip
Logical; if
TRUEand both hemispheres are present, flip the left/right ordering in the layout (useful for anterior views).- zoom
Numeric camera zoom factor passed through to the underlying
view_surfacecalls. Note that each rendered panel is automatically cropped to its content, so camerazoomdoes not change how much of a panel the brain fills; usemarginto control the whitespace around each brain in the assembled figure.- background
Background colour for the rgl scene. Panels are cropped in a background-aware way, so any solid colour (e.g. a dark
"#222222") trims correctly.- brightness
Baseline brightness for a plain surface when no layers are added. Value in \([0,1]\).
- margin
Fraction of background retained around each cropped brain when assembling the figure (e.g.
0.03keeps a 3% band). Smaller values pack the brains more tightly;0crops flush to the content.
Value
An object of class "neurosurf_plot" that can be further
modified with add_surface_layer() and rendered with
render_surface_plot() or draw_surface_plot().
Examples
# \donttest{
geom <- example_surface_geometry()
p <- surface_plot(geom)
p <- add_surface_layer(p, data = rnorm(nrow(coords(geom))))
# }