scale_colour_mnirs: Scales for custom _mnirs_ palette

View source: R/plot.mnirs.R

scale_colour_mnirsR Documentation

Scales for custom mnirs palette

Description

Scales for custom mnirs palette

Usage

scale_colour_mnirs(..., aesthetics = "colour")

scale_color_mnirs(..., aesthetics = "colour")

scale_fill_mnirs(..., aesthetics = "fill")

Arguments

...

Arguments passed to ggplot2::discrete_scale().

aesthetics

A character vector with aesthetic(s) passed to ggplot2::discrete_scale(). Default is "colour".

Value

A ggplot2 scale object.

See Also

theme_mnirs(), palette_mnirs()

Examples


## plot example data
data <- read_mnirs(
    file_path = example_mnirs("moxy_ramp"),
    nirs_channels = c(smo2_left = "SmO2 Live",
                      smo2_right = "SmO2 Live(2)"),
    time_channel = c(time = "hh:mm:ss"),
    verbose = FALSE
)

ggplot2::ggplot(data, ggplot2::aes(x = time)) +
    theme_mnirs() +
    scale_colour_mnirs(name = NULL) +
    ggplot2::geom_line(ggplot2::aes(y = smo2_left, colour = "smo2_left")) +
    ggplot2::geom_line(ggplot2::aes(y = smo2_right, colour = "smo2_right"))


mnirs documentation built on May 15, 2026, 9:07 a.m.