| scale_brain_manual | R Documentation |
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.
scale_brain_manual(
palette,
na.value = "grey",
...,
aesthetics = c("fill", "colour", "color")
)
scale_colour_brain_manual(...)
scale_color_brain_manual(...)
scale_fill_brain_manual(...)
palette |
Named character vector mapping region names to colours. |
na.value |
Colour for 'NA' entries (default: '"grey"'). |
... |
Additional arguments (unused). |
aesthetics |
Which aesthetic to scale: '"fill"', '"colour"', or '"color"'. |
A ggplot2 scale object.
library(ggplot2)
pal <- c("insula" = "red", "precentral" = "blue")
ggplot() +
geom_brain(atlas = dk(), aes(fill = region), show.legend = FALSE) +
scale_fill_brain_manual(palette = pal)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.