plot_glasser: Plot Glasser Atlas Values

View source: R/chart.R

plot_glasserR Documentation

Plot Glasser Atlas Values

Description

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.

Usage

plot_glasser(vals = NULL, value_col = "value", position = "dispersed")

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)

Value

An echarts4r visualization object containing the 2x2 grid of brain views

Examples

## 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)


bbuchsbaum/neuroatlas documentation built on Dec. 24, 2024, 4:22 a.m.