add_glassbrain: Add glass brain to ggseg3d plot

View source: R/additions.R

add_glassbrainR Documentation

Add glass brain to ggseg3d plot

Description

Adds a translucent brain on top of a ggseg3d plot to create a point of reference, particularly important for sub-cortical plots.

Usage

add_glassbrain(
  p,
  hemisphere = c("left", "right"),
  colour = "#cecece",
  opacity = 0.3
)

Arguments

p

plotly object

hemisphere

string. hemisphere to plot ("left" or "right")

colour

string. colour to give the glass brain

opacity

numeric. transparency of the glass brain (0-1 float)

Value

plotly object with glass brain tri-surface mesh

Examples

library(dplyr)
ggseg3d(atlas="aseg_3d") %>%
   add_glassbrain("left")

LCBC-UiO/ggseg3d documentation built on Oct. 24, 2023, 3:49 a.m.