Learn R Programming

ggseg (version 2.0.0)

scale_continous_brain: Axis and label scales for brain atlas plots

Description

Add axis labels and tick labels corresponding to brain atlas regions. These scales add hemisphere or view labels to the x and y axes based on the atlas layout.

Usage

scale_continous_brain(
  atlas = dk(),
  position = "dispersed",
  aesthetics = c("y", "x")
)

scale_x_brain(...)

scale_y_brain(...)

scale_labs_brain(atlas = dk(), position = "dispersed", aesthetics = "labs")

Value

A ggplot2 scale or labs object.

Arguments

atlas

A `ggseg_atlas` object or data.frame containing atlas data.

position

Layout style: `"dispersed"` (default) or `"stacked"`.

aesthetics

Which axis to scale: `"x"`, `"y"`, or `"labs"`.

...

Additional arguments passed to [adapt_scales()].

Examples

Run this code
# \donttest{
library(ggplot2)

ggplot() +
  geom_brain(atlas = dk()) +
  scale_x_brain() +
  scale_y_brain() +
  scale_labs_brain()
# }

Run the code above in your browser using DataLab