Learn R Programming

ggseg (version 2.0.0)

scale_brain: Colour and fill scales from brain atlas palettes

Description

`r lifecycle::badge("deprecated")`

Atlas palettes are now applied automatically by [geom_brain()]. Use [scale_fill_brain_manual()] for custom palettes.

Usage

scale_brain(
  name = "dk",
  na.value = "grey",
  ...,
  aesthetics = c("fill", "colour", "color")
)

scale_colour_brain(name = "dk", na.value = "grey", ...)

scale_color_brain(name = "dk", na.value = "grey", ...)

scale_fill_brain(name = "dk", na.value = "grey", ...)

Value

A ggplot2 scale object.

Arguments

name

String name of the atlas palette (e.g. `"dk"`, `"aseg"`).

na.value

Colour for `NA` entries (default: `"grey"`).

...

Additional arguments passed to [ggseg.formats::atlas_palette()].

aesthetics

Which aesthetic to scale: `"fill"`, `"colour"`, or `"color"`.

Examples

Run this code
if (FALSE) {
library(ggplot2)
ggplot() +
  geom_brain(atlas = dk(), aes(fill = region), show.legend = FALSE) +
  scale_brain("dk")
}

Run the code above in your browser using DataLab