diff --git a/DESCRIPTION b/DESCRIPTION index d044916..59b4213 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: viridis Type: Package Title: Colorblind-Friendly Color Maps for R -Version: 0.6.2 -Date: 2021-10-13 +Version: 0.6.3 +Date: 2023-05-02 Authors@R: c( person("Simon", "Garnier", email = "garnier@njit.edu", role = c("aut", "cre")), person("Noam", "Ross", email = "noam.ross@gmail.com", role = c("ctb", "cph")), @@ -26,7 +26,6 @@ Depends: R (>= 2.10), viridisLite (>= 0.4.0) Imports: - stats, ggplot2 (>= 1.0.1), gridExtra Suggests: @@ -36,8 +35,6 @@ Suggests: knitr, dichromat, colorspace, - raster, - rasterVis, httr, mapproj, vdiffr, @@ -45,8 +42,8 @@ Suggests: testthat, covr, rmarkdown, - rgdal, - maps + maps, + terra LazyData: true VignetteBuilder: knitr URL: https://sjmgarnier.github.io/viridis/, https://github.com/sjmgarnier/viridis/ diff --git a/NEWS.md b/NEWS.md index c1820a6..92b81f0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,18 @@ +# viridis 0.6.3 + +## New features + +* N/A. + +## Minor improvements and fixes + +* Fix scale functions when aesthetics are specified (thanks to Alan O'Callaghan, https://github.com/Alanocallaghan) +* Remove deprecated dependencies. +* Fix CITATION issues. +* Fix check issues. + +--- + # viridis 0.6.2 ## New features diff --git a/R/scales.R b/R/scales.R index a540e6a..4f69df3 100644 --- a/R/scales.R +++ b/R/scales.R @@ -95,6 +95,11 @@ viridis_pal <- function(alpha = 1, begin = 0, end = 1, direction = 1, option= "D #' \item "turbo" (or "H") #' } #' +#' @param aesthetics Character string or vector of character strings listing the +#' name(s) of the aesthetic(s) that this scale works with. This can be useful, +#' for example, to apply colour settings to the colour and fill aesthetics at +#' the same time, via aesthetics = c("colour", "fill"). +#' #' @rdname scale_viridis #' #' @author Noam Ross \email{noam.ross@@gmail.com} / \href{https://twitter.com/noamross}{@@noamross} @@ -154,11 +159,11 @@ viridis_pal <- function(alpha = 1, begin = 0, end = 1, direction = 1, option= "D #' #' @export scale_fill_viridis <- function(..., alpha = 1, begin = 0, end = 1, direction = 1, - discrete = FALSE, option = "D") { + discrete = FALSE, option = "D", aesthetics = "fill") { if (discrete) { - discrete_scale("fill", "viridis", viridis_pal(alpha, begin, end, direction, option), ...) + discrete_scale(aesthetics, "viridis", viridis_pal(alpha, begin, end, direction, option), ...) } else { - scale_fill_gradientn(colours = viridisLite::viridis(256, alpha, begin, end, direction, option), ...) + scale_fill_gradientn(colours = viridisLite::viridis(256, alpha, begin, end, direction, option), aesthetics = aesthetics, ...) } } @@ -167,11 +172,11 @@ scale_fill_viridis <- function(..., alpha = 1, begin = 0, end = 1, direction = 1 #' @importFrom ggplot2 scale_fill_gradientn scale_color_gradientn discrete_scale #' @export scale_color_viridis <- function(..., alpha = 1, begin = 0, end = 1, direction = 1, - discrete = FALSE, option = "D") { + discrete = FALSE, option = "D", aesthetics = "color") { if (discrete) { - discrete_scale("colour", "viridis", viridis_pal(alpha, begin, end, direction, option), ...) + discrete_scale(aesthetics, "viridis", viridis_pal(alpha, begin, end, direction, option), ...) } else { - scale_color_gradientn(colours = viridisLite::viridis(256, alpha, begin, end, direction, option), ...) + scale_color_gradientn(colours = viridisLite::viridis(256, alpha, begin, end, direction, option), aesthetics = aesthetics, ...) } } diff --git a/cran-comments.md b/cran-comments.md index 197c264..1de3fe0 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,21 +1,49 @@ ## Test environments +* local OS X 13.3.1, R 4.3.0, ARM +* local OS X 13.3.1, R-devel, ARM * Github Actions "windows-latest (release)" * Github Actions "macOS-latest (release)" -* Github Actions "ubuntu-20.04-latest (release)" -* Github Actions "ubuntu-20.04-latest (devel)" -* r-hub Windows Server 2008 R2 SP1, R-devel, 32/64 bit -* r-hub Ubuntu Linux 16.04 LTS, R-release, GCC +* Github Actions "ubuntu-22.04-latest (release)" +* Github Actions "ubuntu-22.04-latest (devel)" +* r-hub Windows Server 2022, R-devel, 64 bit +* r-hub Ubuntu Linux 20.04.1 LTS, R-release, GCC * r-hub Fedora Linux, R-devel, clang, gfortran +* win-builder.r-project.org ## R CMD check results -There were no ERRORs or WARNINGs. +There were no ERRORs or WARNINGs. There are NOTEs about possibly invalid URLs. +They are all related to URLs pointing at Twitter profiles. Twitter does not +allow non-logged-in users to access user profiles anymore, preventing the URL +verification. All URLs have been manually checked and are functional. ## Downstream dependencies -Downstream dependencies on CRAN were checked with 'revdepcheck::revdep_check()'. -No new error, warning, and note were found to be caused by this package. +Downstream dependencies on CRAN and Bioconductor were checked with +'revdepcheck::revdep_check()'. We checked 196 reverse dependencies (194 from +CRAN + 2 from Bioconductor), comparing R CMD check results across CRAN and dev +versions of this package. + + * We saw 0 new problems + * We failed to check 12 packages + +Issues with CRAN packages are summarised below. + +### Failed to check + +* cytometree (NA) +* fields (NA) +* geocmeans (NA) +* Hmisc (NA) +* marqLevAlg (NA) +* pdSpecEst (NA) +* RprobitB (NA) +* SFSI (NA) +* simmr (NA) +* skpr (NA) +* spectralGraphTopology (NA) +* StratifiedSampling (NA) ## CRAN team comments diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/docs/.nojekyll @@ -0,0 +1 @@ + diff --git a/docs/404.html b/docs/404.html index fc0c1a0..536d60c 100644 --- a/docs/404.html +++ b/docs/404.html @@ -13,10 +13,10 @@ - - + + - +