Apply a custom named colour palette to brain atlas plots. Use this when you want to override the atlas default colours with your own colour mapping.
Usage
scale_brain_manual(
palette,
na.value = "grey",
...,
aesthetics = c("fill", "colour", "color")
)
scale_colour_brain_manual(...)
scale_color_brain_manual(...)
scale_fill_brain_manual(...)Examples
library(ggplot2)
regions <- ggseg.formats::atlas_regions(dk())[1:2]
pal <- setNames(c("red", "blue"), regions)
ggplot() +
geom_brain(atlas = dk(), aes(fill = region), show.legend = FALSE) +
scale_fill_brain_manual(palette = pal)
