Skip to content

Commit

Permalink
Merge pull request #18 from dracula/package-updates
Browse files Browse the repository at this point in the history
Package updates
  • Loading branch information
jrdnbradford authored Jul 6, 2024
2 parents 8cf8192 + 5d343d2 commit 0b72e4d
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^INSTALL\.md$
^README\.qmd$
^screenshot\.png$
^data-raw$
^.lintr$
^\.github$
^\.pre-commit-config\.yaml$
^renv$
Expand Down
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
Package: ggDracula
Title: Dracula Palettes and ggplot2 Theme
Version: 0.5.3
Title: Dracula theme for R
Version: 0.5.4
Authors@R:
person("Jordan", "Bradford", email = "[email protected]", role = c("aut", "cre"))
Maintainer: Jordan Bradford <[email protected]>
Description: Provides a Dracula ggplot2 theme and palette.
Description: Provides a Dracula ggplot2 theme and R palette.
License: MIT + file LICENSE
BugReports: https://github.com/dracula/ggplot2/issues
URL: https://github.com/dracula/ggplot2, https://github.com/dracula, https://draculatheme.com, https://draculatheme.com/ggplot2
Encoding: UTF-8
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Imports:
dplyr,
ggplot2,
tibble
Suggests:
hexbin,
testthat (>= 3.0.0),
vdiffr
Config/testthat/edition: 3
Expand Down
4 changes: 2 additions & 2 deletions R/scales.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @export
scale_fill_dracula <- function(..., discrete = FALSE, aesthetics = "fill") {
if (discrete) {
discrete_scale(aesthetics, "dracula", dracula_discrete_bright_palette, ...)
discrete_scale(aesthetics, palette = dracula_discrete_bright_palette, ...)
} else {
scale_fill_gradientn(colors = pull(dracula_tibble, hex), aesthetics = aesthetics, ...)
}
Expand All @@ -24,7 +24,7 @@ scale_fill_dracula <- function(..., discrete = FALSE, aesthetics = "fill") {
#' @export
scale_color_dracula <- function(..., discrete = FALSE, aesthetics = "color") {
if (discrete) {
discrete_scale(aesthetics, "dracula", dracula_discrete_bright_palette, ...)
discrete_scale(aesthetics, palette = dracula_discrete_bright_palette, ...)
} else {
scale_color_gradientn(colors = pull(dracula_tibble, hex), aesthetics = aesthetics, ...)
}
Expand Down
1 change: 1 addition & 0 deletions R/theme_dracula.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#'
#' @examples
#' # Set the current `ggplot2` theme with `ggplot2::theme_set`:
#' library(ggplot2)
#' theme_set(theme_dracula())
#'
#' # Or set it for the plot in the pipeline:
Expand Down
Binary file removed img/diamond-point.png
Binary file not shown.
Binary file removed img/hex.png
Binary file not shown.
Binary file removed img/mpg.png
Binary file not shown.
1 change: 1 addition & 0 deletions man/theme_dracula.Rd

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

0 comments on commit 0b72e4d

Please sign in to comment.