Movatterモバイル変換


[0]ホーム

URL:


Type:Package
Title:Show Pride on 'ggplot2' Plots
Version:0.2.0
Description:Provides multiple palettes based on pride flags with tailored themes.
Depends:R (≥ 2.10)
Imports:ggplot2, graphics, grDevices, rlang, tibble
Suggests:knitr, rmarkdown, spelling, testthat (≥ 3.0.0), vdiffr
License:GPL (≥ 3)
Encoding:UTF-8
RoxygenNote:7.2.3
Config/testthat/edition:3
URL:https://github.com/turtletopia/gglgbtq,https://turtletopia.github.io/gglgbtq/
Language:en-US
VignetteBuilder:knitr
NeedsCompilation:no
Packaged:2024-06-25 21:54:16 UTC; erdar
Author:Laura BakalaORCID iD [cre, aut, cph]
Maintainer:Laura Bakala <erdaradun.gaztea@gmail.com>
Repository:CRAN
Date/Publication:2024-06-25 22:20:02 UTC

Apply gglgbtq scales

Description

These functions provide a shorthand for passingpalette_lgbtq() tovalues parameter of an appropriate ggplot2scale.

Usage

scale_color_lgbtq(values, ...)scale_colour_lgbtq(values, ...)scale_fill_lgbtq(values, ...)

Arguments

values

character(1)
Name of the flag the colors are based on.

...

ANY
Arguments passed toggplot2::scale_color_manual().

Value

A scale to be used with aggplot2 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")

Get one of LGBTQ palettes

Description

Returns a palette object with colors based on a specified LGBTQflag. Note: the number of colors vary between palettes!

Usage

palette_lgbtq(name)

Arguments

name

character(1)
Name of the flag the colors are based on.

Value

Anlgbtq_palette object containing a vector of RGB color codes as strings.

Available palettes

Currently available palettes are:

Examples

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"))

List available palettes

Description

Shows the names of available LGBTQ palettes and their metadata.

Usage

show_pride()

Value

Adata.frame with palette names and numbers of colors.

Examples

show_pride()

Use default theme for an LGBTQ palette

Description

Provides a default theme for a given palette. Most LGBTQ flagscontain white, for which the default light gray background of ggplot2 is toolight. Conversely, this same gray is too dark for flags with yellow stripes.LGBTQ themes are carefully curated for each palette.

Usage

theme_lgbtq(name, ...)

Arguments

name

character(1)
Name of the flag the colors are based on.

...

ANY
Parameters passed toggplot2::theme().

Value

A ggplot2theme object.

Available palettes

Currently available palettes are:

Examples

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")

[8]ページ先頭

©2009-2025 Movatter.jp