olink_color_discrete: Olink color scale for discrete ggplots

View source: R/olink_color.R

olink_color_discreteR Documentation

Description

Olink color scale for discrete ggplots

Usage

olink_color_discrete(..., alpha = 1, coloroption = NULL)

Arguments

...

Optional. Additional arguments to pass to ggplot2::discrete_scale()

alpha

transparency (optional)

coloroption

string, one or more of the following: c("red", "orange", "yellow", "green", "teal", "turquoise", "lightblue", "darkblue", "purple", "pink")

Value

No return value, called for side effects

Examples


ggplot2::ggplot(
  data = datasets::mtcars,
  mapping = ggplot2::aes(
    x = .data[["wt"]],
    y = .data[["mpg"]],
    color = as.factor(x = .data[["cyl"]])
  )
) +
  ggplot2::geom_point(
    size = 4L
  ) +
  OlinkAnalyze::olink_color_discrete() +
  ggplot2::theme_bw()

ggplot2::ggplot(
  data = datasets::mtcars,
  mapping = ggplot2::aes(
    x = .data[["wt"]],
    y = .data[["mpg"]],
    color = as.factor(x = .data[["cyl"]])
  )
) +
  ggplot2::geom_point(
    size = 4L
  ) +
  OlinkAnalyze::olink_color_discrete(
    coloroption = c("lightblue", "red", "green")
  ) +
  ggplot2::theme_bw()



OlinkAnalyze documentation built on June 24, 2026, 1:06 a.m.