diff --git a/CITATION.cff b/CITATION.cff index cc2f629..9aea15e 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,18 +1,18 @@ -# ----------------------------------------------------------- -# CITATION file created with {cffr} R package, v0.5.0 +# -------------------------------------------- +# CITATION file created with {cffr} R package # See also: https://docs.ropensci.org/cffr/ -# ----------------------------------------------------------- +# -------------------------------------------- cff-version: 1.2.0 message: 'To cite package "khroma" in publications use:' type: software license: GPL-3.0-or-later title: 'khroma: Colour Schemes for Scientific Data Visualization' -version: 1.12.0 +version: 1.13.0 doi: 10.5281/zenodo.1472077 abstract: Color schemes ready for each type of data (qualitative, diverging or sequential), with colors that are distinct for all people, including color-blind readers. This - package provides an implementation of Paul Tol (2018) and Fabio Crameri (2018) + package provides an implementation of Paul Tol (2018) and Fabio Crameri (2018) color schemes for use with 'graphics' or 'ggplot2'. It provides tools to simulate color-blindness and to test how well the colors of any palette are identifiable. Several scientific thematic schemes (geologic timescale, land cover, FAO soils, @@ -33,13 +33,12 @@ preferred-citation: orcid: https://orcid.org/0000-0001-5759-4944 affiliation: Université Bordeaux Montaigne year: '2024' - location: - name: Pessac, France - notes: R package version 1.12.0 - doi: 10.5281/zenodo.1472077 - url: https://packages.tesselle.org/khroma/ institution: name: Université Bordeaux Montaigne + address: Pessac, France + notes: R package version 1.13.0 + doi: 10.5281/zenodo.1472077 + url: https://packages.tesselle.org/khroma/ repository: https://CRAN.R-project.org/package=khroma repository-code: https://github.com/tesselle/khroma url: https://packages.tesselle.org/khroma/ @@ -61,11 +60,10 @@ references: url: https://www.R-project.org/ authors: - name: R Core Team - location: - name: Vienna, Austria - year: '2024' institution: name: R Foundation for Statistical Computing + address: Vienna, Austria + year: '2024' version: '>= 3.5.0' - type: software title: graphics @@ -73,55 +71,50 @@ references: notes: Imports authors: - name: R Core Team - location: - name: Vienna, Austria - year: '2024' institution: name: R Foundation for Statistical Computing + address: Vienna, Austria + year: '2024' - type: software title: grDevices abstract: 'R: A Language and Environment for Statistical Computing' notes: Imports authors: - name: R Core Team - location: - name: Vienna, Austria - year: '2024' institution: name: R Foundation for Statistical Computing + address: Vienna, Austria + year: '2024' - type: software title: grid abstract: 'R: A Language and Environment for Statistical Computing' notes: Imports authors: - name: R Core Team - location: - name: Vienna, Austria - year: '2024' institution: name: R Foundation for Statistical Computing + address: Vienna, Austria + year: '2024' - type: software title: stats abstract: 'R: A Language and Environment for Statistical Computing' notes: Imports authors: - name: R Core Team - location: - name: Vienna, Austria - year: '2024' institution: name: R Foundation for Statistical Computing + address: Vienna, Austria + year: '2024' - type: software title: utils abstract: 'R: A Language and Environment for Statistical Computing' notes: Imports authors: - name: R Core Team - location: - name: Vienna, Austria - year: '2024' institution: name: R Foundation for Statistical Computing + address: Vienna, Austria + year: '2024' - type: software title: ggplot2 abstract: 'ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics' @@ -156,18 +149,10 @@ references: - family-names: Dunnington given-names: Dewey orcid: https://orcid.org/0000-0002-9415-4582 - year: '2024' -- type: software - title: ggraph - abstract: 'ggraph: An Implementation of Grammar of Graphics for Graphs and Networks' - notes: Suggests - url: https://ggraph.data-imaginist.com - repository: https://CRAN.R-project.org/package=ggraph - authors: - - family-names: Pedersen - given-names: Thomas Lin - email: thomasp85@gmail.com - orcid: https://orcid.org/0000-0002-5147-4711 + - family-names: Brand + given-names: Teun + name-particle: van den + orcid: https://orcid.org/0000-0002-9335-7468 year: '2024' - type: software title: knitr @@ -282,8 +267,9 @@ references: url: https://github.com/markvanderloo/tinytest repository: https://CRAN.R-project.org/package=tinytest authors: - - family-names: van der Loo + - family-names: Loo given-names: Mark + name-particle: van der email: mark.vanderloo@gmail.com orcid: https://orcid.org/0000-0002-9807-4686 year: '2024' @@ -344,4 +330,5 @@ identifiers: value: 10.5281/zenodo.10470003 - description: The Software Heritage identifier for version 1.4.0. type: swh - value: swh:1:dir:ac530bf9321ee33e982c1e3fa44c275e01ba3fb1 + value: swh:1:snp:4eeb6407ecccc7391eddcf1c83dd8b0a20168592 + diff --git a/DESCRIPTION b/DESCRIPTION index 1cf805f..4cb909c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: khroma Title: Colour Schemes for Scientific Data Visualization -Version: 1.12.0.9000 +Version: 1.13.0 Authors@R: c( person("Nicolas", "Frerebeau", , "nicolas.frerebeau@u-bordeaux-montaigne.fr", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-5759-4944", affiliation = "Université Bordeaux Montaigne")), diff --git a/NEWS.md b/NEWS.md index b5264c2..0c5cc1c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# khroma 1.12.0.9000 +# khroma 1.13.0 ## New functions * Add `palette_color_picker()`, `palette_color_continuous()` and `palette_color_discrete()` to map values to colors. * Add `palette_shape()` and `palette_line()` to map values to symbols. @@ -17,7 +17,7 @@ * Add Paul Tol `nightfall` and `incandescent` colour schemes. ## Bugfixes & changes -* Fix `discreterainbow` scheme (qualitative scheme instead of sequential). +* Fix `discreterainbow` scheme (*qualitative* scheme instead of *sequential*). # khroma 1.11.0 ## Bugfixes & changes diff --git a/R/khroma-package.R b/R/khroma-package.R index 457b80b..08aeca0 100644 --- a/R/khroma-package.R +++ b/R/khroma-package.R @@ -2,7 +2,7 @@ #' \tabular{ll}{ #' **Package:** \tab khroma \cr #' **Type:** \tab Package \cr -#' **Version:** \tab 1.12.0 \cr +#' **Version:** \tab 1.13.0 \cr #' **License:** \tab GPL-3 \cr #' **Zenodo:** \tab \doi{10.5281/zenodo.1472077} \cr #' } diff --git a/README.Rmd b/README.Rmd index b13ef55..fb76265 100644 --- a/README.Rmd +++ b/README.Rmd @@ -21,7 +21,7 @@ Sys.setlocale("LC_MESSAGES", 'en_GB.UTF-8') # Force locale [![R-CMD-check](https://github.com/tesselle/khroma/workflows/R-CMD-check/badge.svg)](https://github.com/tesselle/khroma/actions) [![codecov](https://codecov.io/gh/tesselle/khroma/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tesselle/khroma) [![CodeFactor](https://www.codefactor.io/repository/github/tesselle/khroma/badge/main)](https://www.codefactor.io/repository/github/tesselle/khroma/overview/main) -[![Dependencies](https://tinyverse.netlify.com/badge/khroma)](https://cran.r-project.org/package=khroma) +[![Dependencies](https://tinyverse.netlify.app/badge/khroma)](https://cran.r-project.org/package=khroma) [![r-universe](https://tesselle.r-universe.dev/badges/khroma)](https://tesselle.r-universe.dev/khroma){.pkgdown-devel} [![CRAN Version](http://www.r-pkg.org/badges/version/khroma)](https://cran.r-project.org/package=khroma){.pkgdown-release} @@ -53,8 +53,11 @@ For specific uses, several scientific thematic schemes (geologic timescale, land All these color schemes are implemented for use with base R **graphics** or [**ggplot2**](https://github.com/tidyverse/ggplot2) and [**ggraph**](https://github.com/thomasp85/ggraph). -```{r citation, echo=FALSE, comment=''} -utils::citation("khroma") +--- + +```{r citation, echo=FALSE, comment='', results='asis'} +cite <- utils::citation("khroma") +print(cite, bibtex = FALSE) ``` ## Installation diff --git a/README.md b/README.md index ae4d4c6..7cd6159 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![R-CMD-check](https://github.com/tesselle/khroma/workflows/R-CMD-check/badge.svg)](https://github.com/tesselle/khroma/actions) [![codecov](https://codecov.io/gh/tesselle/khroma/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tesselle/khroma) [![CodeFactor](https://www.codefactor.io/repository/github/tesselle/khroma/badge/main)](https://www.codefactor.io/repository/github/tesselle/khroma/overview/main) -[![Dependencies](https://tinyverse.netlify.com/badge/khroma)](https://cran.r-project.org/package=khroma) +[![Dependencies](https://tinyverse.netlify.app/badge/khroma)](https://cran.r-project.org/package=khroma) , - R package version 1.12.0, . +To cite khroma in publications use: - A BibTeX entry for LaTeX users is +Frerebeau N (2024). *khroma: Colour Schemes for Scientific Data +Visualization*. Université Bordeaux Montaigne, Pessac, France. + , R +package version 1.13.0, . - @Manual{, - author = {Nicolas Frerebeau}, - title = {{khroma: Colour Schemes for Scientific Data Visualization}}, - year = {2024}, - organization = {Université Bordeaux Montaigne}, - address = {Pessac, France}, - note = {R package version 1.12.0}, - doi = {10.5281/zenodo.1472077}, - url = {https://packages.tesselle.org/khroma/}, - } - - This package is a part of the tesselle project - . +This package is a part of the tesselle project +. ## Installation @@ -191,21 +180,20 @@ info() ### Color palettes and scales -`color()` returns a palette function that when called with a single -integer argument returns a vector of colors. +`color()` returns a function that when called with a single integer +argument returns a vector of colors. ``` r ## Paul Tol's bright color scheme bright <- color("bright") bright(7) -#> blue red green yellow cyan purple grey -#> "#4477AA" "#EE6677" "#228833" "#CCBB44" "#66CCEE" "#AA3377" "#BBBBBB" +#> [1] "#4477AA" "#EE6677" "#228833" "#CCBB44" "#66CCEE" "#AA3377" "#BBBBBB" #> attr(,"missing") #> [1] NA ``` ``` r -## Show the color palette +## Plot the color scheme plot_scheme(bright(7), colours = TRUE) ``` @@ -220,10 +208,11 @@ plot( x = mpg$displ, y = mpg$hwy, pch = 16, - col = color("bright")(7)[as.factor(mpg$class)], + col = palette_color_picker("bright")(mpg$class), xlab = "displ", ylab = "hwy", - panel.first = grid() + panel.first = grid(), + las = 1 ) ``` @@ -290,7 +279,8 @@ to this project, you agree to abide by its terms. ## References -
+
diff --git a/codecov.yml b/codecov.yml index 7803f3d..9373fa3 100644 --- a/codecov.yml +++ b/codecov.yml @@ -2,6 +2,7 @@ comment: false ignore: - "R/khroma-deprecated.R" + - "R/khroma-defunct.R" - "R/zzz.R" coverage: diff --git a/codemeta.json b/codemeta.json index 60492c4..3bc93c7 100644 --- a/codemeta.json +++ b/codemeta.json @@ -8,13 +8,13 @@ "codeRepository": "https://github.com/tesselle/khroma", "issueTracker": "https://github.com/tesselle/khroma/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "1.12.0", + "version": "1.13.0", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", "url": "https://r-project.org" }, - "runtimePlatform": "R version 4.3.2 (2023-10-31)", + "runtimePlatform": "R version 4.4.1 (2024-06-14)", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", @@ -228,7 +228,7 @@ }, "SystemRequirements": null }, - "fileSize": "1385.792KB", + "fileSize": "1412.117KB", "citation": [ { "@type": "SoftwareSourceCode", @@ -243,7 +243,7 @@ "name": "{khroma: Colour Schemes for Scientific Data Visualization}", "identifier": "10.5281/zenodo.1472077", "url": "https://packages.tesselle.org/khroma/", - "description": "R package version 1.12.0", + "description": "R package version 1.13.0", "@id": "https://doi.org/10.5281/zenodo.1472077", "sameAs": "https://doi.org/10.5281/zenodo.1472077" } diff --git a/man/figures/README-usage-plot-1.png b/man/figures/README-usage-plot-1.png index 33169a8..e1265e9 100644 Binary files a/man/figures/README-usage-plot-1.png and b/man/figures/README-usage-plot-1.png differ diff --git a/man/khroma-package.Rd b/man/khroma-package.Rd index 3a17ffa..e2cf6d8 100644 --- a/man/khroma-package.Rd +++ b/man/khroma-package.Rd @@ -14,7 +14,7 @@ Color schemes ready for each type of data (qualitative, diverging or sequential) \tabular{ll}{ \strong{Package:} \tab khroma \cr \strong{Type:} \tab Package \cr -\strong{Version:} \tab 1.12.0 \cr +\strong{Version:} \tab 1.13.0 \cr \strong{License:} \tab GPL-3 \cr \strong{Zenodo:} \tab \doi{10.5281/zenodo.1472077} \cr } diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index ede01f1..5f216aa 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -4,27 +4,35 @@ template: package: tekton reference: -- title: Colour Palette +- title: Color Schemes + desc: Get carefully chosen color schemes, ready for each type of data. contents: - - has_concept("color palettes") -- title: Qualitative Color Schemes + - has_concept("color schemes") +- title: Palettes + desc: Map variables to visual properpeties. + contents: + - has_concept("palettes") +- title: Diagnostic Tools + contents: + - has_concept("diagnostic tools") +- title: Scales for ggplot2 + contents: + - has_concept("ggplot2 scales") +- subtitle: Qualitative Color Schemes contents: - has_concept("qualitative color schemes") -- title: Diverging Color Schemes +- subtitle: Diverging Color Schemes contents: - has_concept("diverging color schemes") -- title: Sequential Color Schemes +- subtitle: Sequential Color Schemes contents: - has_concept("sequential color schemes") -- title: Multi Sequential Color Schemes +- subtitle: Multi Sequential Color Schemes contents: - has_concept("multi sequential color schemes") -- title: Cyclic Color Schemes +- subtitle: Cyclic Color Schemes contents: - has_concept("cyclic color schemes") -- title: Themed Color Schemes +- subtitle: Themed Color Schemes contents: - has_concept("themed color schemes") -- title: Diagnostic Tools - contents: - - has_concept("diagnostic tools") diff --git a/revdep/README.md b/revdep/README.md index 34fce06..8b58047 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -1,24 +1,24 @@ # Platform -|field |value | -|:--------|:----------------------------------------| -|version |R version 4.3.2 (2023-10-31) | -|os |Ubuntu 22.04.3 LTS | -|system |x86_64, linux-gnu | -|ui |RStudio | -|language |(EN) | -|collate |fr_FR.UTF-8 | -|ctype |fr_FR.UTF-8 | -|tz |Europe/Paris | -|date |2023-12-19 | -|rstudio |2023.09.0+463 Desert Sunflower (desktop) | -|pandoc |NA | +|field |value | +|:--------|:------------------------------------------------------------------------------------| +|version |R version 4.4.1 (2024-06-14) | +|os |Ubuntu 22.04.4 LTS | +|system |x86_64, linux-gnu | +|ui |RStudio | +|language |(EN) | +|collate |fr_FR.UTF-8 | +|ctype |fr_FR.UTF-8 | +|tz |Europe/Paris | +|date |2024-06-30 | +|rstudio |2024.04.2+764 Chocolate Cosmos (desktop) | +|pandoc |3.1.11 @ /usr/lib/rstudio/resources/app/bin/quarto/bin/tools/x86_64/ (via rmarkdown) | # Dependencies |package |old |new |Δ | |:-------|:------|:------|:--| -|khroma |1.11.0 |1.12.0 |* | +|khroma |1.12.0 |1.13.0 |* | # Revdeps