plot_glasser | R Documentation |
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.
plot_glasser(vals = NULL, value_col = "value", position = "dispersed")
vals |
A data frame containing values to plot, must include columns:
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) |
An echarts4r visualization object containing the 2x2 grid of brain views
## Not run:
# 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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.