Skip to content

Commit

Permalink
Merge pull request #90 from sjmgarnier/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sjmgarnier authored May 3, 2023
2 parents d45a28f + f156e8e commit 79b851c
Show file tree
Hide file tree
Showing 129 changed files with 3,956 additions and 1,354 deletions.
11 changes: 4 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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")),
Expand All @@ -26,7 +26,6 @@ Depends:
R (>= 2.10),
viridisLite (>= 0.4.0)
Imports:
stats,
ggplot2 (>= 1.0.1),
gridExtra
Suggests:
Expand All @@ -36,17 +35,15 @@ Suggests:
knitr,
dichromat,
colorspace,
raster,
rasterVis,
httr,
mapproj,
vdiffr,
svglite (>= 1.2.0),
testthat,
covr,
rmarkdown,
rgdal,
maps
maps,
terra
LazyData: true
VignetteBuilder: knitr
URL: https://sjmgarnier.github.io/viridis/, https://github.com/sjmgarnier/viridis/
Expand Down
15 changes: 15 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 11 additions & 6 deletions R/scales.R
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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, ...)
}

}
Expand All @@ -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, ...)
}
}

Expand Down
42 changes: 35 additions & 7 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

10 changes: 5 additions & 5 deletions docs/404.html

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

6 changes: 3 additions & 3 deletions docs/LICENSE-text.html

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

Loading

0 comments on commit 79b851c

Please sign in to comment.