Title: | Show Pride on 'ggplot2' Plots |
---|---|
Description: | Provides multiple palettes based on pride flags with tailored themes. |
Authors: | Laura Bakala [cre, aut, cph] |
Maintainer: | Laura Bakala <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.2.0 |
Built: | 2024-11-11 05:31:00 UTC |
Source: | https://github.com/turtletopia/gglgbtq |
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, ...)
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")
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")
Returns a palette object with colors based on a specified LGBTQ flag. Note: the number of colors vary between palettes!
palette_lgbtq(name)
palette_lgbtq(name)
name |
|
An lgbtq_palette
object containing a vector of RGB color codes as strings.
Currently available palettes are:
rainbow
(6 colors)
lesbian
(5 colors)
gay
(5 colors)
bisexual
(3 colors)
transgender
(3 colors)
asexual
(4 colors)
intersex
(2 colors)
nonbinary
(4 colors)
philadelphia
(8 colors)
progress
(11 colors)
aromantic
(5 colors)
acesthetic
(4 colors)
analterous
(4 colors)
asensual
(4 colors)
ace_spectrum
(4 colors)
aro_spectrum
(5 colors)
aroace
(5 colors)
alloace
(4 colors)
aroallo
(5 colors)
pansexual
(3 colors)
androsexual
(3 colors)
gynesexual
(3 colors)
abrosexual
(5 colors)
lesbian_7
(7 colors)
gay_7
(7 colors)
demiboy
(4 colors)
demigirl
(4 colors)
helian
(5 colors)
lunarian
(5 colors)
solarian
(5 colors)
stellarian
(5 colors)
genderfluid
(5 colors)
genderqueer
(3 colors)
agender
(4 colors)
bigender
(6 colors)
amatopunk
(5 colors)
bear
(7 colors)
butch
(7 colors)
femme
(5 colors)
otter
(5 colors)
queerhet
(5 colors)
palette_lgbtq("bisexual") data <- data.frame( x = 1:10, y = 15:6, group = rep(c("a", "b"), each = 5) ) ggplot2::ggplot(data, ggplot2::aes(x = x, y = y, color = group)) + ggplot2::geom_point(size = 4) + ggplot2::scale_color_manual(values = palette_lgbtq("intersex"))
palette_lgbtq("bisexual") data <- data.frame( x = 1:10, y = 15:6, group = rep(c("a", "b"), each = 5) ) ggplot2::ggplot(data, ggplot2::aes(x = x, y = y, color = group)) + ggplot2::geom_point(size = 4) + ggplot2::scale_color_manual(values = palette_lgbtq("intersex"))
Shows the names of available LGBTQ palettes and their metadata.
show_pride()
show_pride()
A data.frame
with palette names and numbers of colors.
show_pride()
show_pride()
Provides a default theme for a given palette. Most LGBTQ flags contain white, for which the default light gray background of ggplot2 is too light. Conversely, this same gray is too dark for flags with yellow stripes. LGBTQ themes are carefully curated for each palette.
theme_lgbtq(name, ...)
theme_lgbtq(name, ...)
name |
|
... |
|
A ggplot2 theme
object.
Currently available palettes are:
rainbow
(6 colors)
lesbian
(5 colors)
gay
(5 colors)
bisexual
(3 colors)
transgender
(3 colors)
asexual
(4 colors)
intersex
(2 colors)
nonbinary
(4 colors)
philadelphia
(8 colors)
progress
(11 colors)
aromantic
(5 colors)
acesthetic
(4 colors)
analterous
(4 colors)
asensual
(4 colors)
ace_spectrum
(4 colors)
aro_spectrum
(5 colors)
aroace
(5 colors)
alloace
(4 colors)
aroallo
(5 colors)
pansexual
(3 colors)
androsexual
(3 colors)
gynesexual
(3 colors)
abrosexual
(5 colors)
lesbian_7
(7 colors)
gay_7
(7 colors)
demiboy
(4 colors)
demigirl
(4 colors)
helian
(5 colors)
lunarian
(5 colors)
solarian
(5 colors)
stellarian
(5 colors)
genderfluid
(5 colors)
genderqueer
(3 colors)
agender
(4 colors)
bigender
(6 colors)
amatopunk
(5 colors)
bear
(7 colors)
butch
(7 colors)
femme
(5 colors)
otter
(5 colors)
queerhet
(5 colors)
data <- data.frame( x = 1:10, y = 15:6, group = rep(c("a", "b"), each = 5) ) ggplot2::ggplot(data, ggplot2::aes(x = x, y = y, color = group)) + ggplot2::geom_point(size = 4) + scale_color_lgbtq("intersex") + # Use the same name as for values, preferably theme_lgbtq("intersex")
data <- data.frame( x = 1:10, y = 15:6, group = rep(c("a", "b"), each = 5) ) ggplot2::ggplot(data, ggplot2::aes(x = x, y = y, color = group)) + ggplot2::geom_point(size = 4) + scale_color_lgbtq("intersex") + # Use the same name as for values, preferably theme_lgbtq("intersex")