ggseg_schaefer | R Documentation |
Creates an interactive visualization of the Schaefer atlas using ggseg, with optional value mapping and customizable appearance.
ggseg_schaefer(
atlas,
vals,
thresh = c(0, 0),
pos = FALSE,
palette = "Spectral",
interactive = TRUE,
lim = range(vals)
)
atlas |
An atlas object containing Schaefer parcellation information |
vals |
Numeric vector of values to visualize on the atlas |
thresh |
Numeric vector of length 2 specifying (min, max) thresholds. Values outside this range will be set to NA. Default: c(0,0) |
pos |
Logical. If TRUE, uses raw values; if FALSE, uses absolute values for thresholding. Default: FALSE |
palette |
Character string specifying the color palette to use. Default: "Spectral" |
interactive |
Logical. If TRUE, creates an interactive plot with tooltips. Default: TRUE |
lim |
Numeric vector of length 2 specifying the range for color mapping. Default: range(vals) |
A ggplot2 object (if interactive=FALSE) or a ggiraph object (if interactive=TRUE) showing the visualization
## Not run:
# Load Schaefer atlas
atlas <- get_schaefer_atlas("7networks", 100)
# Create random values for visualization
vals <- rnorm(100)
# Create interactive plot
ggseg_schaefer(atlas, vals)
# Create static plot with custom thresholds
ggseg_schaefer(atlas, vals, thresh=c(-1, 1), interactive=FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.