lgbtq-scales {gglgbtq} | R Documentation |
Apply gglgbtq scales
Description
These functions provide a shorthand for passing palette_lgbtq()
to values
parameter of an appropriate ggplot2
scale.
Usage
scale_color_lgbtq(values, ...)
scale_colour_lgbtq(values, ...)
scale_fill_lgbtq(values, ...)
Arguments
values |
|
... |
|
Value
A scale to be used with a ggplot2 object.
Examples
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")
[Package gglgbtq version 0.2.0 Index]