Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
ErdaradunGaztea committed Sep 11, 2022
2 parents 28e8715 + fb5d591 commit db030fd
Show file tree
Hide file tree
Showing 47 changed files with 309 additions and 20 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v1

- uses: r-lib/actions/setup-r@v1
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: pkgdown
needs: website

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ vignettes/*.pdf

*.Rproj
.Rproj.user

inst/doc
docs
8 changes: 6 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: gglgbtq
Type: Package
Title: Show Pride on 'ggplot2' Plots
Version: 0.1.0
Version: 0.1.1
Date: 2022-08-06
Authors@R: c(person("Laura", "Bakala",
email = "[email protected]",
Expand All @@ -12,12 +12,16 @@ Imports:
graphics,
grDevices
Suggests:
knitr,
rmarkdown,
spelling,
testthat (>= 3.0.0)
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
Config/testthat/edition: 3
URL: https://github.com/turtletopia/gglgbtq
URL: https://github.com/turtletopia/gglgbtq,
https://turtletopia.github.io/gglgbtq/
Language: en-US
VignetteBuilder: knitr
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# gglgbtq 0.1.1

* Implemented the following palettes: `agender`, `alloace`, `aroallo`, `bigender`, `demiboy`, `demigirl`.
* Changed `gay_man` to `gay` (and, analogously, `gay_7`).
* Moved palettes to the "Gallery" vignette.

# gglgbtq 0.1.0

* Initial version of the package.
Expand Down
31 changes: 29 additions & 2 deletions R/themes.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,32 @@ theme_lgbtq_white <- function(...) {
)
}

# Default settings are fine
theme_bisexual <- ggplot2::theme
theme_agender <- function(...) {
ggplot2::theme(
panel.background = element_rect(fill = "#DDE3D8", color = NA),
panel.grid.minor = element_line(size = rel(0.5)),
legend.key = element_rect(fill = "#DDE3D8", color = NA),
...
)
}

theme_demiboy <- function(...) {
ggplot2::theme(
panel.background = element_rect(fill = "#D8E0E3", color = NA),
panel.grid.minor = element_line(size = rel(0.5)),
legend.key = element_rect(fill = "#D8E0E3", color = NA),
...
)
}

theme_demigirl <- function(...) {
ggplot2::theme(
panel.background = element_rect(fill = "#E3DADD", color = NA),
panel.grid.minor = element_line(size = rel(0.5)),
legend.key = element_rect(fill = "#E3DADD", color = NA),
...
)
}

# Default settings are fine too
theme_ggplot2 <- ggplot2::theme
28 changes: 25 additions & 3 deletions R/zzz_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pride_data <- list(
),
bisexual = list(
colors = c("#D00070", "#8C4799", "#0032A0"),
theme = theme_bisexual
theme = theme_ggplot2
),
asexual = list(
colors = c("#000000", "#A4A4A4", "#FFFFFF", "#810081")
Expand All @@ -31,7 +31,7 @@ pride_data <- list(
lesbian = list(
colors = c("#D62900", "#FF9B55", "#FFFFFF", "#D461A6", "#A50062")
),
gay_man = list(
gay = list(
colors = c("#078D70", "#98E8C1", "#FFFFFF", "#7BADE2", "#3D1A78")
),
intersex = list(
Expand All @@ -50,7 +50,29 @@ pride_data <- list(
lesbian_7 = list(
colors = c("#A60061", "#B95594", "#D162A8", "#FFFFFF", "#E5ADD1", "#C64D53", "#8C1801")
),
gay_man_7 = list(
gay_7 = list(
colors = c("#078D70", "#26CEAA", "#98E8C1", "#FFFFFF", "#7BADE2", "#5049CC", "#3D1A78")
),
agender = list(
colors = c("#000000", "#BCC4C7", "#FFFFFF", "#B7F684"),
theme = theme_agender
),
demiboy = list(
colors = c("#7F7F7F", "#C4C4C4", "#9DD7EA", "#FFFFFF"),
theme = theme_demiboy
),
demigirl = list(
colors = c("#7F7F7F", "#C4C4C4", "#FDADC8", "#FFFFFF"),
theme = theme_demigirl
),
bigender = list(
colors = c("#C479A2", "#EDA5CD", "#D6C7E8", "#FFFFFF", "#9AC7E8", "#6D82D1"),
theme = theme_ggplot2
),
alloace = list(
colors = c("#D50100", "#F85858", "#FFFFFF", "#81007F")
),
aroallo = list(
colors = c("#3DA542", "#A8D379", "#FFFFFF", "#FBE34B", "#E8BB00")
)
)
13 changes: 4 additions & 9 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,21 @@ ggplot(data, aes(x = x, y = y, fill = as.factor(group))) +

## Gallery

Only a few most common palettes are included below. For the complete list, see [palette gallery vignette](https://turtletopia.github.io/gglgbtq/articles/gallery.html).

```{r}
palette_lgbtq("rainbow")
palette_lgbtq("philadelphia")
palette_lgbtq("progress")
palette_lgbtq("lesbian")
palette_lgbtq("gay_man")
# In its original meaning of "gay men"
palette_lgbtq("gay")
palette_lgbtq("bisexual")
# Background added to avoid the "disappearance" of the white stripe
print(palette_lgbtq("transgender"), background = "gray92")
palette_lgbtq("asexual")
palette_lgbtq("pansexual")
palette_lgbtq("nonbinary")
palette_lgbtq("intersex")
palette_lgbtq("aromantic")
palette_lgbtq("genderfluid")
palette_lgbtq("genderqueer")
# Alternative version of 5-stripes lesbian flag
palette_lgbtq("lesbian_7")
# Alternative version of 5-stripes gay men flag
palette_lgbtq("gay_man_7")
```

## End notes
Expand Down
Binary file removed README_files/figure-gfm/unnamed-chunk-3-1.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-10.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-11.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-12.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-13.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-14.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-15.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-16.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-2.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-3.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-4.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-5.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-6.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-7.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-8.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-3-9.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-4-1.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-5-1.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-6-1.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-1.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-10.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-11.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-12.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-13.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-14.png
Binary file not shown.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-15.png
Diff not rendered.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-16.png
Diff not rendered.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-2.png
Diff not rendered.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-3.png
Diff not rendered.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-4.png
Diff not rendered.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-5.png
Diff not rendered.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-6.png
Diff not rendered.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-7.png
Diff not rendered.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-8.png
Diff not rendered.
Binary file removed README_files/figure-gfm/unnamed-chunk-7-9.png
Diff not rendered.
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url: https://turtletopia.github.io/gglgbtq/
template:
bootstrap: 5

10 changes: 8 additions & 2 deletions man/palette_lgbtq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions man/theme_lgbtq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
*.R
Loading

0 comments on commit db030fd

Please sign in to comment.