Skip to contents

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.

Examples


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

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