Creates an interactive visualization of values mapped onto the Glasser atlas using echarts4r. The visualization shows both hemispheres in lateral and medial views, arranged in a 2x2 grid.
Arguments
- vals
A data frame containing values to plot, must include columns:
label: character, matching ggseg Glasser atlas labels (e.g., "lh_L_V1")
value: numeric, values to visualize for each region
If NULL (default), all regions will be assigned a value of 1
- value_col
Character string specifying the name of the column in vals containing the values to plot. Defaults to "value"
- position
Character string specifying layout type. Currently only "dispersed" is supported (stacked layout is planned for future versions)
Examples
if (FALSE) { # \dontrun{
# Basic visualization with uniform coloring
plot_glasser()
# Create sample data
vals <- data.frame(
label = ggsegGlasser::glasser$data$label,
value = rnorm(nrow(ggsegGlasser::glasser$data))
)
# Plot the data
plot_glasser(vals)
# Using a different column name
vals$intensity <- vals$value
plot_glasser(vals, value_col = "intensity")
} # }