Learn R Programming

ggseg3d (version 2.0.0)

apply_colours_and_legend: Apply colour palette and build legend data

Description

Shared pipeline step for all atlas types: applies colour palette to atlas data and builds the legend data structure.

Usage

apply_colours_and_legend(atlas_data, colour_by, palette, na_colour, label_by)

Value

List with `atlas_data` and `legend_data`

Arguments

atlas_data

Prepared atlas data frame

colour_by

Column name for colour values

palette

Colour palette specification

na_colour

Colour for NA values

label_by

Column name for labels