| olink_color_discrete | R Documentation |
Olink color scale for discrete ggplots
olink_color_discrete(..., alpha = 1, coloroption = NULL)
... |
Optional. Additional arguments to pass to
|
alpha |
transparency (optional) |
coloroption |
string, one or more of the following: c("red", "orange", "yellow", "green", "teal", "turquoise", "lightblue", "darkblue", "purple", "pink") |
No return value, called for side effects
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.