Skip to content

Commit 001b00a

Browse files
authored
Merge branch 'main' into repurpose_expand
2 parents f0a379e + 2e08bba commit 001b00a

File tree

221 files changed

+7360
-7986
lines changed

Some content is hidden

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

221 files changed

+7360
-7986
lines changed

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ on:
1010
pull_request:
1111
branches: [main, master]
1212

13-
name: R-CMD-check
13+
name: R-CMD-check.yaml
14+
15+
permissions: read-all
1416

1517
jobs:
1618
R-CMD-check:
@@ -25,15 +27,15 @@ jobs:
2527
- {os: macos-latest, r: 'release'}
2628

2729
- {os: windows-latest, r: 'release'}
28-
# use 4.1 to check with rtools40's older compiler
29-
- {os: windows-latest, r: '4.1'}
30+
# use 4.0 or 4.1 to check with rtools40's older compiler
31+
- {os: windows-latest, r: 'oldrel-4'}
3032

31-
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
32-
- {os: ubuntu-latest, r: 'release'}
33-
- {os: ubuntu-latest, r: 'oldrel-1'}
34-
- {os: ubuntu-latest, r: 'oldrel-2'}
35-
- {os: ubuntu-latest, r: 'oldrel-3'}
36-
- {os: ubuntu-latest, r: 'oldrel-4'}
33+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
34+
- {os: ubuntu-latest, r: 'release'}
35+
- {os: ubuntu-latest, r: 'oldrel-1'}
36+
- {os: ubuntu-latest, r: 'oldrel-2'}
37+
- {os: ubuntu-latest, r: 'oldrel-3'}
38+
- {os: ubuntu-latest, r: 'oldrel-4'}
3739

3840
env:
3941
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
@@ -46,7 +48,7 @@ jobs:
4648
VDIFFR_LOG_PATH: "../vdiffr.Rout.fail"
4749

4850
steps:
49-
- uses: actions/checkout@v3
51+
- uses: actions/checkout@v4
5052

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

@@ -62,9 +64,10 @@ jobs:
6264
extra-packages: >
6365
any::rcmdcheck,
6466
Hmisc=?ignore-before-r=4.1.0,
65-
quantreg=?ignore-before-r=4.3.0,
67+
quantreg=?ignore-before-r=4.3.0
6668
needs: check
6769

6870
- uses: r-lib/actions/check-r-package@v2
6971
with:
7072
upload-snapshots: true
73+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ on:
99
types: [published]
1010
workflow_dispatch:
1111

12-
name: pkgdown
12+
name: pkgdown.yaml
13+
14+
permissions: read-all
1315

1416
jobs:
1517
pkgdown:
@@ -19,8 +21,10 @@ jobs:
1921
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
2022
env:
2123
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
24+
permissions:
25+
contents: write
2226
steps:
23-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2428

2529
- uses: r-lib/actions/setup-pandoc@v2
2630

@@ -39,7 +43,7 @@ jobs:
3943

4044
- name: Deploy to GitHub pages 🚀
4145
if: github.event_name != 'pull_request'
42-
uses: JamesIves/github-pages-deploy-action@v4.4.1
46+
uses: JamesIves/github-pages-deploy-action@v4.5.0
4347
with:
4448
clean: false
4549
branch: gh-pages

.github/workflows/pr-commands.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
issue_comment:
55
types: [created]
66

7-
name: Commands
7+
name: pr-commands.yaml
8+
9+
permissions: read-all
810

911
jobs:
1012
document:
@@ -13,8 +15,10 @@ jobs:
1315
runs-on: ubuntu-latest
1416
env:
1517
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
permissions:
19+
contents: write
1620
steps:
17-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
1822

1923
- uses: r-lib/actions/pr-fetch@v2
2024
with:
@@ -50,8 +54,10 @@ jobs:
5054
runs-on: ubuntu-latest
5155
env:
5256
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
57+
permissions:
58+
contents: write
5359
steps:
54-
- uses: actions/checkout@v3
60+
- uses: actions/checkout@v4
5561

5662
- uses: r-lib/actions/pr-fetch@v2
5763
with:

.github/workflows/test-coverage.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
pull_request:
77
branches: [main, master]
88

9-
name: test-coverage
9+
name: test-coverage.yaml
10+
11+
permissions: read-all
1012

1113
jobs:
1214
test-coverage:
@@ -15,36 +17,45 @@ jobs:
1517
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1618

1719
steps:
18-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
1921

2022
- uses: r-lib/actions/setup-r@v2
2123
with:
2224
use-public-rspm: true
2325

2426
- uses: r-lib/actions/setup-r-dependencies@v2
2527
with:
26-
extra-packages: any::covr
28+
extra-packages: any::covr, any::xml2
2729
needs: coverage
2830

2931
- name: Test coverage
3032
run: |
31-
covr::codecov(
33+
cov <- covr::package_coverage(
3234
quiet = FALSE,
3335
clean = FALSE,
34-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
36+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3537
)
38+
covr::to_cobertura(cov)
3639
shell: Rscript {0}
3740

41+
- uses: codecov/codecov-action@v4
42+
with:
43+
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
44+
file: ./cobertura.xml
45+
plugin: noop
46+
disable_search: true
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
3849
- name: Show testthat output
3950
if: always()
4051
run: |
4152
## --------------------------------------------------------------------
42-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
53+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4354
shell: bash
4455

4556
- name: Upload test results
4657
if: failure()
47-
uses: actions/upload-artifact@v3
58+
uses: actions/upload-artifact@v4
4859
with:
4960
name: coverage-test-failures
5061
path: ${{ runner.temp }}/package

CONTRIBUTING.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,19 @@ Each of these steps are described in more detail below. This might feel
6161
overwhelming the first time you get set up, but it gets easier with practice.
6262
If you get stuck at any point, please reach out for help on the [ggplot2-dev](https://groups.google.com/forum/#!forum/ggplot2-dev) mailing list.
6363

64-
If you're not familiar with git or github, please start by reading <http://r-pkgs.had.co.nz/git.html>
64+
If you're not familiar with git or github, please start by reading <https://r-pkgs.org/software-development-practices.html>
6565

6666
<!--
6767
* [ ] Motivate the change in one paragraph, and include it in NEWS.
6868
In parentheses, reference your github user name and this issue:
6969
`(@hadley, #1234)`
7070
* [ ] Check pull request only includes relevant changes.
71-
* [ ] Use the [official style](http://adv-r.had.co.nz/Style.html).
71+
* [ ] Use the [official style](https://style.tidyverse.org).
7272
* [ ] Update documentation and re-run roxygen2
7373
* [ ] Add test, if bug in non-graphical function
7474
* [ ] Add visual test, if bug in graphical function
7575
* [ ] Add minimal example, if new graphical feature
7676
77-
See http://docs.ggplot2.org/dev/vignettes/development.html for more details.
7877
--->
7978

8079
Pull requests will be evaluated against a seven point checklist:
@@ -100,20 +99,16 @@ Pull requests will be evaluated against a seven point checklist:
10099
and don't submit any others until the first one has been processed.
101100

102101
1. __Use ggplot2 coding style__. Please follow the
103-
[official tidyverse style](http://style.tidyverse.org). Maintaining
102+
[official tidyverse style](https://style.tidyverse.org). Maintaining
104103
a consistent style across the whole code base makes it much easier to
105104
jump into the code. If you're modifying existing ggplot2 code that
106105
doesn't follow the style guide, a separate pull request to fix the
107106
style would be greatly appreciated.
108107

109108
1. If you're adding new parameters or a new function, you'll also need
110-
to document them with [roxygen](https://github.com/klutometis/roxygen).
109+
to document them with [roxygen2](https://github.com/r-lib/roxygen2).
111110
Make sure to re-run `devtools::document()` on the code before submitting.
112111

113-
Currently, ggplot2 uses the development version of roxygen2, which you
114-
can get with `install_github("klutometis/roxygen")`. This will be
115-
available on CRAN in the near future.
116-
117112
1. If fixing a bug or adding a new feature to a non-graphical function,
118113
please add a [testthat](https://github.com/r-lib/testthat) unit test.
119114

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ Imports:
3939
isoband,
4040
lifecycle (> 1.0.1),
4141
MASS,
42-
mgcv,
4342
rlang (>= 1.1.0),
4443
scales (>= 1.3.0),
4544
stats,
46-
tibble,
4745
vctrs (>= 0.6.0),
4846
withr (>= 2.5.0)
4947
Suggests:
@@ -55,6 +53,7 @@ Suggests:
5553
knitr,
5654
mapproj,
5755
maps,
56+
mgcv,
5857
multcomp,
5958
munsell,
6059
nlme,
@@ -67,6 +66,7 @@ Suggests:
6766
sf (>= 0.7-3),
6867
svglite (>= 2.1.2),
6968
testthat (>= 3.1.5),
69+
tibble,
7070
vdiffr (>= 1.0.6),
7171
xml2
7272
Enhances:
@@ -78,7 +78,7 @@ Config/testthat/edition: 3
7878
Encoding: UTF-8
7979
LazyData: true
8080
Roxygen: list(markdown = TRUE)
81-
RoxygenNote: 7.3.1
81+
RoxygenNote: 7.3.2
8282
Collate:
8383
'ggproto.R'
8484
'ggplot-global.R'

NAMESPACE

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ export(draw_key_vpath)
344344
export(dup_axis)
345345
export(el_def)
346346
export(element_blank)
347+
export(element_geom)
347348
export(element_grob)
348349
export(element_line)
349350
export(element_rect)
@@ -367,6 +368,7 @@ export(find_panel)
367368
export(flip_data)
368369
export(flipped_names)
369370
export(fortify)
371+
export(from_theme)
370372
export(geom_abline)
371373
export(geom_area)
372374
export(geom_bar)
@@ -422,6 +424,7 @@ export(geom_violin)
422424
export(geom_vline)
423425
export(get_alt_text)
424426
export(get_element_tree)
427+
export(get_geom_defaults)
425428
export(get_guide_data)
426429
export(get_last_plot)
427430
export(get_layer_data)
@@ -513,6 +516,8 @@ export(remove_missing)
513516
export(render_axes)
514517
export(render_strips)
515518
export(replace_theme)
519+
export(reset_geom_defaults)
520+
export(reset_stat_defaults)
516521
export(reset_theme_settings)
517522
export(resolution)
518523
export(scale_alpha)
@@ -733,7 +738,6 @@ importFrom(grid,unit)
733738
importFrom(lifecycle,deprecated)
734739
importFrom(scales,alpha)
735740
importFrom(stats,setNames)
736-
importFrom(tibble,tibble)
737741
importFrom(utils,.DollarNames)
738742
importFrom(utils,head)
739743
importFrom(utils,tail)

NEWS.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22

33
* `coord_*(expand)` can now take a logical vector to control expansion at any
44
side of the panel (top, right, bottom, left) (@teunbrand, #6020)
5+
* (Breaking) The defaults for all geoms can be set at one in the theme.
6+
(@teunbrand based on pioneering work by @dpseidel, #2239)
7+
* A new `theme(geom)` argument is used to track these defaults.
8+
* The `element_geom()` function can be used to populate that argument.
9+
* The `from_theme()` function allows access to the theme default fields from
10+
inside the `aes()` function.
11+
* Passing empty unmapped aesthetics to layers raises a warning instead of
12+
throwing an error (@teunbrand, #6009).
13+
* Moved {mgcv} from Imports to Suggests (@teunbrand, #5986)
14+
* New `reset_geom_defaults()` and `reset_stat_defaults()` to restore all geom or
15+
stat default aesthetics at once (@teunbrand, #5975).
16+
* `facet_wrap()` can have `space = "free_x"` with 1-row layouts and
17+
`space = "free_y"` with 1-column layouts (@teunbrand)
18+
* Secondary axes respect `n.breaks` setting in continuous scales (@teunbrand, #4483).
19+
* Layers can have names (@teunbrand, #4066).
20+
* (internal) improvements to `pal_qualitative()` (@teunbrand, #5013)
21+
* `coord_radial(clip = "on")` clips to the panel area when the graphics device
22+
supports clipping paths (@teunbrand, #5952).
23+
* (internal) Panel clipping responsibility moved from Facet class to Coord
24+
class through new `Coord$draw_panel()` method.
25+
* `theme(strip.clip)` now defaults to `"on"` and is independent of Coord
26+
clipping (@teunbrand, 5952).
27+
* (internal) rearranged the code of `Facet$draw_paensl()` method (@teunbrand).
28+
* Axis labels are now justified across facet panels (@teunbrand, #5820)
29+
* Fixed bug in `stat_function()` so x-axis title now produced automatically
30+
when no data added. (@phispu, #5647).
31+
* geom_sf now accepts shape names (@sierrajohnson, #5808)
32+
* Added `gg` class to `labs()` (@phispu, #5553).
533
* Missing values from discrete palettes are no longer translated
634
(@teunbrand, #5929).
735
* Fixed bug in `facet_grid(margins = TRUE)` when using expresssions
@@ -135,6 +163,13 @@
135163
(@teunbrand, #5938, #4327).
136164
* Fixed bug where empty discrete scales weren't recognised as such
137165
(@teunbrand, #5945).
166+
* (internal) The summary function of `stat_summary()` and `stat_summary_bin()`
167+
is setup once in total instead of once per group (@teunbrand, #5971)
168+
* `facet_grid(space = "free")` can now be combined with `coord_fixed()`
169+
(@teunbrand, #4584).
170+
* `theme_classic()` now has black ticks and text instead of dark gray. In
171+
addition, `theme_classic()`'s axis line end is `"square"` (@teunbrand, #5978).
172+
* {tibble} is now suggested instead of imported (@teunbrand, #5986)
138173

139174
# ggplot2 3.5.1
140175

0 commit comments

Comments
 (0)