lgbtq-scales | R Documentation |
These functions provide a shorthand for passing palette_lgbtq()
to values
parameter of an appropriate ggplot2
scale.
scale_color_lgbtq(values, ...)
scale_colour_lgbtq(values, ...)
scale_fill_lgbtq(values, ...)
values |
|
... |
|
A scale to be used with a ggplot2 object.
data <- data.frame(
x = 1:10, y = 15:6,
group = rep(c("a", "b"), each = 5)
)
# Instead of specifying scale_color_manual()
ggplot2::ggplot(data, ggplot2::aes(x = x, y = y, color = group)) +
ggplot2::geom_point(size = 4) +
ggplot2::scale_color_manual(values = palette_lgbtq("intersex"))
# One can use scale_color_lgbtq()
ggplot2::ggplot(data, ggplot2::aes(x = x, y = y, color = group)) +
ggplot2::geom_point(size = 4) +
scale_color_lgbtq("intersex")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.