Skip to content

Commit 3df083c

Browse files
authored
Merge branch 'master' into v3.3.3-rc
2 parents 79a3f90 + c70ef2a commit 3df083c

File tree

180 files changed

+2203
-756
lines changed

Some content is hidden

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

180 files changed

+2203
-756
lines changed

.Rbuildignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
visual_test
44
^.*\.Rproj$
55
^\.Rproj\.user$
6-
^\.travis\.yml$
76
^/\.gitattributes$
87
^inst/web$
98
^notes$
@@ -22,7 +21,6 @@ visual_test
2221
^README\.Rmd$
2322
^README-.*\.png$
2423
^logo\.png$
25-
^appveyor\.yml$
2624
^\.github$
2725
^vignettes/profilings
2826
^vignettes/profiling.Rmd$

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

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name: R-CMD-check
1010

1111
# Increment this version when we want to clear cache
1212
env:
13-
cache-version: v2
13+
cache-version: v4
1414

1515
jobs:
1616
R-CMD-check:
@@ -22,21 +22,22 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
config:
25-
- {os: windows-latest, r: '4.0', vdiffr: true}
26-
- {os: macOS-latest, r: '4.0', vdiffr: true}
27-
- {os: macOS-latest, r: 'devel', vdiffr: false}
28-
- {os: ubuntu-16.04, r: '4.0', vdiffr: true, cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
29-
- {os: ubuntu-16.04, r: '3.6', vdiffr: false, cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
30-
- {os: ubuntu-16.04, r: '3.5', vdiffr: false, cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
31-
- {os: ubuntu-16.04, r: '3.4', vdiffr: false, cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
32-
- {os: ubuntu-16.04, r: '3.3', vdiffr: false, cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
33-
- {os: ubuntu-16.04, r: '3.2', vdiffr: false, cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
25+
- {os: windows-latest, r: '4.0', vdiffr: true, xref: true}
26+
- {os: macOS-latest, r: '4.0', vdiffr: true, xref: true}
27+
- {os: ubuntu-16.04, r: 'devel', vdiffr: false, xref: true}
28+
- {os: ubuntu-16.04, r: '4.0', vdiffr: true, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
29+
- {os: ubuntu-16.04, r: '3.6', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
30+
- {os: ubuntu-16.04, r: '3.5', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
31+
- {os: ubuntu-16.04, r: '3.4', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
32+
- {os: ubuntu-16.04, r: '3.3', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
3433

3534
env:
3635
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
37-
CRAN: ${{ matrix.config.cran }}
36+
RSPM: ${{ matrix.config.rspm }}
3837
# don't treat missing suggested packages as error
3938
_R_CHECK_FORCE_SUGGESTS_: false
39+
# Some packages might unavailable on the older versions, so let's ignore xref warnings
40+
_R_CHECK_RD_XREFS_: ${{ matrix.config.xref }}
4041
# Runs vdiffr test only on the latest version of R
4142
VDIFFR_RUN_TESTS: ${{ matrix.config.vdiffr }}
4243
VDIFFR_LOG_PATH: "../vdiffr.Rout.fail"
@@ -47,6 +48,7 @@ jobs:
4748
- uses: r-lib/actions/setup-r@master
4849
with:
4950
r-version: ${{ matrix.config.r }}
51+
http-user-agent: ${{ matrix.config.http-user-agent }}
5052

5153
- uses: r-lib/actions/setup-pandoc@master
5254

@@ -66,39 +68,20 @@ jobs:
6668

6769
- name: Install system dependencies on Linux
6870
if: runner.os == 'Linux'
69-
env:
70-
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
7171
run: |
72-
# Use cran:libgit2 PPA to avoid conflicts of libcurl4-gnutls-dev
73-
# Remove this after https://github.com/r-lib/actions/pull/97 gets merged
74-
sudo add-apt-repository ppa:cran/libgit2
75-
76-
Rscript -e "remotes::install_github('r-hub/sysreqs')"
77-
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
78-
sudo -s eval "$sysreqs"
79-
80-
# Remove this when the new rmarkdown is released on CRAN
81-
- name: "Workaround for rstudio/rmarkdown#1831"
82-
if: runner.os == 'Linux' && matrix.config.r < '3.6'
83-
run: Rscript -e "remotes::install_github('rstudio/rmarkdown')"
72+
while read -r cmd
73+
do
74+
eval sudo $cmd
75+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "16.04"))')
8476
8577
- name: Install system dependencies on macOS
8678
if: runner.os == 'macOS'
8779
run: |
8880
# XQuartz is needed by vdiffr
8981
brew cask install xquartz
9082
91-
# To install vdiffr, these three libraries/tools are needed in addition to XQuartz
92-
# - freetype (already installed, needed by systemfonts)
93-
# - cairo (not installed, needed by gdtools)
94-
# - pkg-config (not installed, needed to set proper build settings)
95-
brew install pkg-config cairo
96-
97-
# Since sf dependencies are a bit heavy, install them only when they are needed
98-
SF_NEEDS_UPDATED=$(Rscript -e 'if (!"sf" %in% installed.packages()[,"Package"] || "sf" %in% old.packages()[,"Package"]) cat("yes")')
99-
if [ "${SF_NEEDS_UPDATED}" == "yes" ]; then
100-
brew install udunits gdal
101-
fi
83+
# Use only binary packages
84+
echo 'options(pkgType = "binary")' >> ~/.Rprofile
10285
10386
- name: Install dependencies
10487
run: |

.github/workflows/pkgdown.yaml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,41 @@ name: pkgdown
1010
jobs:
1111
pkgdown:
1212
runs-on: macOS-latest
13+
env:
14+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1315
steps:
1416
- uses: actions/checkout@v2
17+
1518
- uses: r-lib/actions/setup-r@master
19+
1620
- uses: r-lib/actions/setup-pandoc@master
21+
22+
- name: Query dependencies
23+
run: |
24+
install.packages('remotes')
25+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
26+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
27+
shell: Rscript {0}
28+
29+
- name: Cache R packages
30+
uses: actions/cache@v1
31+
with:
32+
path: ${{ env.R_LIBS_USER }}
33+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
34+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
35+
1736
- name: Install dependencies
1837
run: |
19-
install.packages("remotes")
20-
remotes::install_deps(dependencies = TRUE)
38+
remotes::install_deps(dependencies = TRUE, type = "binary")
2139
remotes::install_github("tidyverse/tidytemplate")
2240
remotes::install_dev("pkgdown")
2341
shell: Rscript {0}
42+
2443
- name: Install package
2544
run: R CMD INSTALL .
45+
2646
- name: Deploy package
27-
run: pkgdown::deploy_to_branch(new_process = FALSE)
28-
shell: Rscript {0}
47+
run: |
48+
git config --local user.email "[email protected]"
49+
git config --local user.name "GitHub Actions"
50+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

.github/workflows/pr-commands.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,22 @@ jobs:
77
if: startsWith(github.event.comment.body, '/document')
88
name: document
99
runs-on: macOS-latest
10+
env:
11+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1012
steps:
1113
- uses: actions/checkout@v2
1214
- uses: r-lib/actions/pr-fetch@master
1315
with:
1416
repo-token: ${{ secrets.GITHUB_TOKEN }}
1517
- uses: r-lib/actions/setup-r@master
1618
- name: Install dependencies
17-
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
19+
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE, type = "binary")'
1820
- name: Document
1921
run: Rscript -e 'roxygen2::roxygenise()'
2022
- name: commit
2123
run: |
24+
git config --local user.email "[email protected]"
25+
git config --local user.name "GitHub Actions"
2226
git add man/\* NAMESPACE
2327
git commit -m 'Document'
2428
- uses: r-lib/actions/pr-push@master
@@ -28,6 +32,8 @@ jobs:
2832
if: startsWith(github.event.comment.body, '/style')
2933
name: style
3034
runs-on: macOS-latest
35+
env:
36+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3137
steps:
3238
- uses: actions/checkout@v2
3339
- uses: r-lib/actions/pr-fetch@master
@@ -40,13 +46,10 @@ jobs:
4046
run: Rscript -e 'styler::style_pkg()'
4147
- name: commit
4248
run: |
49+
git config --local user.email "[email protected]"
50+
git config --local user.name "GitHub Actions"
4351
git add \*.R
4452
git commit -m 'Style'
4553
- uses: r-lib/actions/pr-push@master
4654
with:
4755
repo-token: ${{ secrets.GITHUB_TOKEN }}
48-
# A mock job just to ensure we have a successful build status
49-
finish:
50-
runs-on: ubuntu-latest
51-
steps:
52-
- run: true

.github/workflows/test-coverage.yaml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,14 @@ jobs:
3939
restore-keys: ${{ env.cache-version }}-macOS-r-${{ env.r-version }}-
4040

4141
- name: Install system dependencies on macOS
42-
if: runner.os == 'macOS'
4342
run: |
4443
# XQuartz is needed by vdiffr
4544
brew cask install xquartz
4645
47-
# To install vdiffr, these three libraries/tools are needed in addition to XQuartz
48-
# - freetype (already installed, needed by systemfonts)
49-
# - cairo (not installed, needed by gdtools)
50-
# - pkg-config (not installed, needed to set proper build settings)
51-
brew install pkg-config cairo
52-
53-
# Since sf dependencies are a bit heavy, install them only when they are needed
54-
SF_NEEDS_UPDATED=$(Rscript -e 'if (!"sf" %in% installed.packages()[,"Package"] || "sf" %in% old.packages()[,"Package"]) cat("yes")')
55-
if [ "${SF_NEEDS_UPDATED}" == "yes" ]; then
56-
brew install udunits gdal
57-
fi
58-
5946
- name: Install dependencies
6047
run: |
6148
install.packages(c("remotes"))
62-
remotes::install_deps(dependencies = TRUE)
49+
remotes::install_deps(dependencies = TRUE, type = "binary")
6350
remotes::install_cran("covr")
6451
shell: Rscript {0}
6552

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Authors@R: c(
2525
person("RStudio", role = c("cph", "fnd"))
2626
)
2727
Depends:
28-
R (>= 3.2)
28+
R (>= 3.3)
2929
Imports:
3030
digest,
3131
glue,
@@ -63,7 +63,8 @@ Suggests:
6363
sf (>= 0.7-3),
6464
svglite (>= 1.2.0.9001),
6565
testthat (>= 2.1.0),
66-
vdiffr (>= 0.3.0)
66+
vdiffr (>= 0.3.0),
67+
xml2
6768
Enhances: sp
6869
License: MIT + file LICENSE
6970
URL: https://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2

NAMESPACE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ S3method(widthDetails,titleGrob)
143143
S3method(widthDetails,zeroGrob)
144144
export("%+%")
145145
export("%+replace%")
146+
export(":=")
146147
export(.data)
147148
export(.pt)
148149
export(.stroke)
@@ -271,7 +272,9 @@ export(annotation_logticks)
271272
export(annotation_map)
272273
export(annotation_raster)
273274
export(arrow)
275+
export(as_label)
274276
export(as_labeller)
277+
export(as_name)
275278
export(autolayer)
276279
export(autoplot)
277280
export(benchplot)
@@ -494,6 +497,7 @@ export(scale_color_ordinal)
494497
export(scale_color_steps)
495498
export(scale_color_steps2)
496499
export(scale_color_stepsn)
500+
export(scale_color_viridis_b)
497501
export(scale_color_viridis_c)
498502
export(scale_color_viridis_d)
499503
export(scale_colour_binned)
@@ -589,6 +593,7 @@ export(scale_y_sqrt)
589593
export(scale_y_time)
590594
export(sec_axis)
591595
export(set_last_plot)
596+
export(sf_transform_xy)
592597
export(should_stop)
593598
export(stage)
594599
export(standardise_aes_names)

NEWS.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,37 @@
11
# ggplot2 (development version)
22

3+
* `ggsave()` now sets the default background to match the fill value of the
4+
`plot.background` theme element (@karawoo, #4057)
5+
6+
* Extended `stat_ecdf()` to calculate the cdf from either x or y instead from y only (@jgjl, #4005).
7+
8+
* Fixed a bug in `labeller()` so that `.default` is passed to `as_labeller()`
9+
when labellers are specified by naming faceting variables. (@waltersom, #4031)
10+
11+
* Updated style for example code (@rjake, #4092)
12+
13+
* Only drop groups in `stat_ydensity()` when there are fewer than two data points and throw a warning (@andrewwbutler, #4111).
14+
15+
* It is now deprecated to specify `guides(<scale> = FALSE)` or
16+
`scale_*(guide = FALSE)` to remove a guide. Please use
17+
`guides(<scale> = "none")` or `scale_*(guide = "none")` instead
18+
(@yutannihilation, #4094).
19+
20+
* Date and datetime position scales support out-of-bounds (oob) arguments to
21+
control how limits affect data outside those limits (@teunbrand, #4199).
22+
23+
* `stat_bin()`'s computed variable `width` is now documented (#3522).
24+
25+
* ggplot2 now requires R >= 3.3 (#4247).
26+
327
# ggplot2 3.3.3
428
This is a small patch release mainly intended to address changes in R and CRAN.
529
It further changes the licensing model of ggplot2 to an MIT license.
630

731
* Update the ggplot2 licence to an MIT license (#4231, #4232, #4233, and #4281)
32+
833
* Use vdiffr conditionally so ggplot2 can be tested on systems without vdiffr
34+
935
* Update tests to work with the new `all.equal()` defaults in R >4.0.3
1036

1137
# ggplot2 3.3.2
@@ -16,6 +42,16 @@ This is a small release focusing on fixing regressions introduced in 3.3.1.
1642

1743
* `annotation_raster()` adds support for native rasters. For large rasters,
1844
native rasters render significantly faster than arrays (@kent37, #3388)
45+
46+
* `coord_sf()` now has an argument `default_crs` that specifies the coordinate
47+
reference system (CRS) for non-sf layers and scale/coord limits. This argument
48+
defaults to the World Geodetic System 1984 (WGS84), which means x and y positions
49+
are interpreted as longitude and latitude. This is a potentially breaking change
50+
for users who use projected coordinates in non-sf layers or in limits. Setting
51+
`default_crs = NULL` recovers the old behavior. Further, authors of extension
52+
packages implementing `stat_sf()`-like functionality are encouraged to look at the
53+
source code of `stat_sf()`'s `compute_group()` function to see how to provide
54+
scale-limit hints to `coord_sf()` (@clauswilke, #3659).
1955

2056
* Facet strips now have dedicated position-dependent theme elements
2157
(`strip.text.x.top`, `strip.text.x.bottom`, `strip.text.y.left`,

0 commit comments

Comments
 (0)