Skip to content

Commit a47be59

Browse files
authored
Upkeep 2024-10 (#6156)
* record upkeep date * `usethis::use_mit_licence()` * fix broken urls * `usethis:::use_codecov_badge()` * `usethis::use_lifecycle()` * `usethis::use_tidy_logo()` & `pkgdown::build_favicons(overwrite = TRUE)` * Alt text for cheat sheet link * Use `knitr::convert_chunk_header(type = "yaml")` (#6149) * Use `expect_snapshot(error = TRUE)` instead of `expect_error()` (#6150) * replace `expect_error()` by `expect_snapshot(error = TRUE)` * censor machine dependent paths in snapshots * commit snapshots * skip gnarly snapshots * Bump R version * `usethis::use_tidy_description()` * distribute `test-guides.R` * convert chunk headers * regenerate snapshots after moving guides * adapt to gtable 0.3.6 * use 'core developer team' as copyright holder * replace `expect_warning()` * fix non portable file path check * Hmisc 5.2-0 requires R >= 4.2.0
1 parent b174986 commit a47be59

File tree

155 files changed

+2320
-1531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+2320
-1531
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
cache-version: 3
6464
extra-packages: >
6565
any::rcmdcheck,
66-
Hmisc=?ignore-before-r=4.1.0,
66+
Hmisc=?ignore-before-r=4.2.0,
6767
quantreg=?ignore-before-r=4.3.0
6868
needs: check
6969

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: ggplot2
2-
Version: 3.5.1.9000
32
Title: Create Elegant Data Visualisations Using the Grammar of Graphics
3+
Version: 3.5.1.9000
44
Authors@R: c(
55
person("Hadley", "Wickham", , "[email protected]", role = "aut",
66
comment = c(ORCID = "0000-0003-4757-117X")),
@@ -30,7 +30,7 @@ License: MIT + file LICENSE
3030
URL: https://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2
3131
BugReports: https://github.com/tidyverse/ggplot2/issues
3232
Depends:
33-
R (>= 3.5)
33+
R (>= 4.0)
3434
Imports:
3535
cli,
3636
grDevices,
@@ -75,6 +75,7 @@ VignetteBuilder:
7575
knitr
7676
Config/Needs/website: ggtext, tidyr, forcats, tidyverse/tidytemplate
7777
Config/testthat/edition: 3
78+
Config/usethis/last-upkeep: 2024-10-24
7879
Encoding: UTF-8
7980
LazyData: true
8081
Roxygen: list(markdown = TRUE)

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22

3-
Copyright (c) 2020 ggplot2 authors
3+
Copyright (c) 2024 ggplot2 core developer team
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

R/stat-ellipse.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#'
66
#' @references John Fox and Sanford Weisberg (2011). An \R Companion to
77
#' Applied Regression, Second Edition. Thousand Oaks CA: Sage. URL:
8-
#' \url{https://socialsciences.mcmaster.ca/jfox/Books/Companion/}
8+
#' \url{https://www.john-fox.ca/Companion/}
99
#' @references Michael Friendly. Georges Monette. John Fox. "Elliptical Insights: Understanding Statistical Methods through Elliptical Geometry."
1010
#' Statist. Sci. 28 (1) 1 - 39, February 2013. URL: \url{https://projecteuclid.org/journals/statistical-science/volume-28/issue-1/Elliptical-Insights-Understanding-Statistical-Methods-through-Elliptical-Geometry/10.1214/12-STS402.full}
1111
#'

README.Rmd

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ output: github_document
44

55
<!-- README.md is generated from README.Rmd. Please edit that file -->
66

7-
```{r, echo = FALSE}
7+
```{r}
8+
#| echo: false
89
knitr::opts_chunk$set(
910
collapse = TRUE,
1011
comment = "#>",
1112
fig.path = "man/figures/README-"
1213
)
1314
```
1415

15-
# ggplot2 <a href="https://ggplot2.tidyverse.org"><img src="man/figures/logo.png" align="right" height="138" /></a>
16+
# ggplot2 <a href="https://ggplot2.tidyverse.org"><img src="man/figures/logo.png" align="right" height="138" alt="ggplot2 website" /></a>
1617

1718
<!-- badges: start -->
1819
[![R-CMD-check](https://github.com/tidyverse/ggplot2/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidyverse/ggplot2/actions/workflows/R-CMD-check.yaml)
19-
[![Codecov test coverage](https://codecov.io/gh/tidyverse/ggplot2/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/ggplot2?branch=main)
2020
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/ggplot2)](https://cran.r-project.org/package=ggplot2)
21+
[![Codecov test coverage](https://codecov.io/gh/tidyverse/ggplot2/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/ggplot2)
2122
<!-- badges: end -->
2223

2324
## Overview
@@ -26,7 +27,8 @@ ggplot2 is a system for declaratively creating graphics, based on [The Grammar o
2627

2728
## Installation
2829

29-
```{r, eval = FALSE}
30+
```{r}
31+
#| eval: false
3032
# The easiest way to get ggplot2 is to install the whole tidyverse:
3133
install.packages("tidyverse")
3234
@@ -40,13 +42,14 @@ pak::pak("tidyverse/ggplot2")
4042

4143
## Cheatsheet
4244

43-
<a href="https://github.com/rstudio/cheatsheets/blob/master/data-visualization.pdf"><img src="https://raw.githubusercontent.com/rstudio/cheatsheets/master/pngs/thumbnails/data-visualization-cheatsheet-thumbs.png" width="630" height="252"/></a>
45+
<a href="https://github.com/rstudio/cheatsheets/blob/master/data-visualization.pdf"><img src="https://raw.githubusercontent.com/rstudio/cheatsheets/master/pngs/thumbnails/data-visualization-cheatsheet-thumbs.png" width="630" height="252" alt="ggplot2 cheatsheet" /></a>
4446

4547
## Usage
4648

4749
It's hard to succinctly describe how ggplot2 works because it embodies a deep philosophy of visualisation. However, in most cases you start with `ggplot()`, supply a dataset and aesthetic mapping (with `aes()`). You then add on layers (like `geom_point()` or `geom_histogram()`), scales (like `scale_colour_brewer()`), faceting specifications (like `facet_wrap()`) and coordinate systems (like `coord_flip()`).
4850

49-
```{r example}
51+
```{r}
52+
#| label: example
5053
#| fig.alt: "Scatterplot of engine displacement versus highway miles per
5154
#| gallon, for 234 cars coloured by 7 'types' of car. The displacement and miles
5255
#| per gallon are inversely correlated."

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

22
<!-- README.md is generated from README.Rmd. Please edit that file -->
33

4-
# ggplot2 <a href="https://ggplot2.tidyverse.org"><img src="man/figures/logo.png" align="right" height="138" /></a>
4+
# ggplot2 <a href="https://ggplot2.tidyverse.org"><img src="man/figures/logo.png" align="right" height="138" alt="ggplot2 website" /></a>
55

66
<!-- badges: start -->
77

88
[![R-CMD-check](https://github.com/tidyverse/ggplot2/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidyverse/ggplot2/actions/workflows/R-CMD-check.yaml)
9-
[![Codecov test
10-
coverage](https://codecov.io/gh/tidyverse/ggplot2/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/ggplot2?branch=main)
119
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/ggplot2)](https://cran.r-project.org/package=ggplot2)
10+
[![Codecov test
11+
coverage](https://codecov.io/gh/tidyverse/ggplot2/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/ggplot2)
1212
<!-- badges: end -->
1313

1414
## Overview
@@ -35,7 +35,7 @@ pak::pak("tidyverse/ggplot2")
3535

3636
## Cheatsheet
3737

38-
<a href="https://github.com/rstudio/cheatsheets/blob/master/data-visualization.pdf"><img src="https://raw.githubusercontent.com/rstudio/cheatsheets/master/pngs/thumbnails/data-visualization-cheatsheet-thumbs.png" width="630" height="252"/></a>
38+
<a href="https://github.com/rstudio/cheatsheets/blob/master/data-visualization.pdf"><img src="https://raw.githubusercontent.com/rstudio/cheatsheets/master/pngs/thumbnails/data-visualization-cheatsheet-thumbs.png" width="630" height="252" alt="ggplot2 cheatsheet" /></a>
3939

4040
## Usage
4141

man/figures/lifecycle-deprecated.svg

Lines changed: 21 additions & 1 deletion
Loading
Lines changed: 21 additions & 1 deletion
Loading

man/figures/lifecycle-stable.svg

Lines changed: 29 additions & 1 deletion
Loading

man/figures/lifecycle-superseded.svg

Lines changed: 21 additions & 1 deletion
Loading

man/figures/logo.png

-114 Bytes
Loading

man/stat_ellipse.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkgdown/favicon/apple-touch-icon.png

-3.89 KB
Loading

pkgdown/favicon/favicon-48x48.png

2 KB
Loading

pkgdown/favicon/favicon.ico

0 Bytes
Binary file not shown.

pkgdown/favicon/favicon.svg

Lines changed: 3 additions & 0 deletions
Loading

pkgdown/favicon/site.webmanifest

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "",
3+
"short_name": "",
4+
"icons": [
5+
{
6+
"src": "/web-app-manifest-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png",
9+
"purpose": "maskable"
10+
},
11+
{
12+
"src": "/web-app-manifest-512x512.png",
13+
"sizes": "512x512",
14+
"type": "image/png",
15+
"purpose": "maskable"
16+
}
17+
],
18+
"theme_color": "#ffffff",
19+
"background_color": "#ffffff",
20+
"display": "standalone"
21+
}
12.9 KB
Loading
70.8 KB
Loading

tests/testthat/_snaps/aes-calculated.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77
Duplicated aesthetics after name standardisation: colour
88

9+
# calculated aesthetics throw warnings when lengths mismatch
10+
11+
Failed to apply `after_stat()` for the following aesthetic: colour.
12+
13+
---
14+
15+
Failed to apply `after_scale()` for the following aesthetic: colour.
16+
917
# A deprecated warning is issued when stat(var) or ..var.. is used
1018

1119
`stat(foo)` was deprecated in ggplot2 3.4.0.

tests/testthat/_snaps/aes-setting.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# aesthetic parameters match length of data
2+
3+
Code
4+
set_colours(rep("red", 2))
5+
Condition
6+
Error in `geom_point()`:
7+
! Problem while setting up geom aesthetics.
8+
i Error occurred in the 1st layer.
9+
Caused by error in `check_aesthetics()`:
10+
! Aesthetics must be either length 1 or the same as the data (5).
11+
x Fix the following mappings: `colour`.
12+
13+
---
14+
15+
Code
16+
set_colours(rep("red", 3))
17+
Condition
18+
Error in `geom_point()`:
19+
! Problem while setting up geom aesthetics.
20+
i Error occurred in the 1st layer.
21+
Caused by error in `check_aesthetics()`:
22+
! Aesthetics must be either length 1 or the same as the data (5).
23+
x Fix the following mappings: `colour`.
24+
25+
---
26+
27+
Code
28+
set_colours(rep("red", 4))
29+
Condition
30+
Error in `geom_point()`:
31+
! Problem while setting up geom aesthetics.
32+
i Error occurred in the 1st layer.
33+
Caused by error in `check_aesthetics()`:
34+
! Aesthetics must be either length 1 or the same as the data (5).
35+
x Fix the following mappings: `colour`.
36+

tests/testthat/_snaps/aes.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1+
# accessing an undefined variable results in an error
2+
3+
Code
4+
get_layer_data(p)
5+
Condition
6+
Error in `geom_point()`:
7+
! Problem while computing aesthetics.
8+
i Error occurred in the 1st layer.
9+
Caused by error:
10+
! object 'foo' not found
11+
12+
# aes standardises aesthetic names
13+
14+
Duplicated aesthetics after name standardisation: colour
15+
16+
# warn_for_aes_extract_usage() warns for discouraged uses of $ and [[ within aes()
17+
18+
Use of `df$x` is discouraged.
19+
i Use `x` instead.
20+
21+
---
22+
23+
Use of `df[["x"]]` is discouraged.
24+
i Use `.data[["x"]]` instead.
25+
26+
---
27+
28+
Use of `df$x` is discouraged.
29+
i Use `x` instead.
30+
31+
# warn_for_aes_extract_usage() does not evaluate function calls
32+
33+
Use of `df$x` is discouraged.
34+
i Use `x` instead.
35+
36+
# Warnings are issued when plots use discouraged extract usage within aes()
37+
38+
Use of `df$x` is discouraged.
39+
i Use `x` instead.
40+
141
# aes evaluation fails with unknown input
242

343
Unknown input: <environment>

tests/testthat/_snaps/coord-.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,19 @@
1818

1919
`coord()` has not implemented a `range()` method.
2020

21+
# check coord limits errors only on bad inputs
22+
23+
Code
24+
check_coord_limits(xlim(1, 2))
25+
Condition
26+
Error:
27+
! `xlim(1, 2)` must be a vector of length 2, not a <ScaleContinuousPosition> object.
28+
29+
---
30+
31+
Code
32+
check_coord_limits(1:3)
33+
Condition
34+
Error:
35+
! `1:3` must be a vector of length 2, not an integer vector of length 3.
36+

tests/testthat/_snaps/coord-transform.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# warnings are generated when coord_trans() results in new infinite values
2+
3+
Transformation introduced infinite values in y-axis
4+
5+
---
6+
7+
Transformation introduced infinite values in x-axis
8+
19
# coord_trans() throws error when limits are badly specified
210

311
`xlim` must be a vector of length 2, not a <ScaleContinuousPosition> object.

0 commit comments

Comments
 (0)