diff --git a/.Rbuildignore b/.Rbuildignore index 0b36b19..2c3fd0c 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,6 +1,10 @@ ^.*\.Rproj$ ^\.Rproj\.user$ -^LICENSE\.md$ +^INSTALL\.md$ +^README\.qmd$ +^screenshot\.png$ +^data-raw$ +^.lintr$ ^\.github$ ^\.pre-commit-config\.yaml$ ^renv$ diff --git a/DESCRIPTION b/DESCRIPTION index 3ac15a5..686795e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 = "jrdnbradford@gmail.com", role = c("aut", "cre")) Maintainer: Jordan Bradford -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 diff --git a/R/scales.R b/R/scales.R index d81314e..9c1594e 100644 --- a/R/scales.R +++ b/R/scales.R @@ -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, ...) } @@ -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, ...) } diff --git a/R/theme_dracula.R b/R/theme_dracula.R index a836459..2b35569 100644 --- a/R/theme_dracula.R +++ b/R/theme_dracula.R @@ -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: diff --git a/img/diamond-point.png b/img/diamond-point.png deleted file mode 100644 index 8783710..0000000 Binary files a/img/diamond-point.png and /dev/null differ diff --git a/img/hex.png b/img/hex.png deleted file mode 100644 index 8c48b28..0000000 Binary files a/img/hex.png and /dev/null differ diff --git a/img/mpg.png b/img/mpg.png deleted file mode 100644 index 802daf0..0000000 Binary files a/img/mpg.png and /dev/null differ diff --git a/man/theme_dracula.Rd b/man/theme_dracula.Rd index df777de..b9c9581 100644 --- a/man/theme_dracula.Rd +++ b/man/theme_dracula.Rd @@ -11,6 +11,7 @@ Provides a minimal \code{ggplot2} theme with a Dracula-ish, dark backdrop. } \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: