Skip to content

Commit 7222b27

Browse files
authored
Merge branch 'main' into vctr_friendly_mapping
2 parents c1568c2 + a4264bc commit 7222b27

File tree

387 files changed

+7782
-4139
lines changed

Some content is hidden

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

387 files changed

+7782
-4139
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: 9 additions & 8 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,21 +30,21 @@ 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,
3737
grid,
3838
gtable (>= 0.1.1),
3939
isoband,
4040
lifecycle (> 1.0.1),
41-
MASS,
4241
rlang (>= 1.1.0),
4342
scales (>= 1.3.0),
4443
stats,
4544
vctrs (>= 0.6.0),
4645
withr (>= 2.5.0)
4746
Suggests:
47+
broom,
4848
covr,
4949
dplyr,
5050
ggplot2movies,
@@ -53,6 +53,7 @@ Suggests:
5353
knitr,
5454
mapproj,
5555
maps,
56+
MASS,
5657
mgcv,
5758
multcomp,
5859
munsell,
@@ -75,6 +76,7 @@ VignetteBuilder:
7576
knitr
7677
Config/Needs/website: ggtext, tidyr, forcats, tidyverse/tidytemplate
7778
Config/testthat/edition: 3
79+
Config/usethis/last-upkeep: 2024-10-24
7880
Encoding: UTF-8
7981
LazyData: true
8082
Roxygen: list(markdown = TRUE)
@@ -125,15 +127,15 @@ Collate:
125127
'facet-grid-.R'
126128
'facet-null.R'
127129
'facet-wrap.R'
128-
'fortify-lm.R'
129130
'fortify-map.R'
130-
'fortify-multcomp.R'
131+
'fortify-models.R'
131132
'fortify-spatial.R'
132133
'fortify.R'
133134
'stat-.R'
134135
'geom-abline.R'
135136
'geom-rect.R'
136137
'geom-bar.R'
138+
'geom-tile.R'
137139
'geom-bin2d.R'
138140
'geom-blank.R'
139141
'geom-boxplot.R'
@@ -150,7 +152,6 @@ Collate:
150152
'geom-density2d.R'
151153
'geom-dotplot.R'
152154
'geom-errorbar.R'
153-
'geom-errorbarh.R'
154155
'geom-freqpoly.R'
155156
'geom-function.R'
156157
'geom-hex.R'
@@ -167,7 +168,6 @@ Collate:
167168
'geom-smooth.R'
168169
'geom-spoke.R'
169170
'geom-text.R'
170-
'geom-tile.R'
171171
'geom-violin.R'
172172
'geom-vline.R'
173173
'ggplot2-package.R'
@@ -254,6 +254,7 @@ Collate:
254254
'stat-ellipse.R'
255255
'stat-function.R'
256256
'stat-identity.R'
257+
'stat-manual.R'
257258
'stat-qq-line.R'
258259
'stat-qq.R'
259260
'stat-quantilemethods.R'
@@ -273,10 +274,10 @@ Collate:
273274
'theme.R'
274275
'theme-defaults.R'
275276
'theme-current.R'
277+
'theme-sub.R'
276278
'utilities-break.R'
277279
'utilities-grid.R'
278280
'utilities-help.R'
279-
'utilities-matrix.R'
280281
'utilities-patterns.R'
281282
'utilities-resolution.R'
282283
'utilities-tidy-eval.R'

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

NAMESPACE

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ S3method(guide_train,default)
8484
S3method(guide_transform,default)
8585
S3method(heightDetails,titleGrob)
8686
S3method(heightDetails,zeroGrob)
87-
S3method(interleave,default)
88-
S3method(interleave,unit)
8987
S3method(limits,Date)
9088
S3method(limits,POSIXct)
9189
S3method(limits,POSIXlt)
@@ -96,6 +94,7 @@ S3method(makeContext,dotstackGrob)
9694
S3method(merge_element,default)
9795
S3method(merge_element,element)
9896
S3method(merge_element,element_blank)
97+
S3method(merge_element,margin)
9998
S3method(pattern_alpha,GridPattern)
10099
S3method(pattern_alpha,GridTilingPattern)
101100
S3method(pattern_alpha,default)
@@ -126,8 +125,6 @@ S3method(scale_type,logical)
126125
S3method(scale_type,numeric)
127126
S3method(scale_type,ordered)
128127
S3method(scale_type,sfc)
129-
S3method(single_value,default)
130-
S3method(single_value,factor)
131128
S3method(summary,ggplot)
132129
S3method(vec_cast,character.mapped_discrete)
133130
S3method(vec_cast,double.mapped_discrete)
@@ -176,6 +173,7 @@ export(GeomAbline)
176173
export(GeomAnnotationMap)
177174
export(GeomArea)
178175
export(GeomBar)
176+
export(GeomBin2d)
179177
export(GeomBlank)
180178
export(GeomBoxplot)
181179
export(GeomCol)
@@ -267,6 +265,7 @@ export(StatEcdf)
267265
export(StatEllipse)
268266
export(StatFunction)
269267
export(StatIdentity)
268+
export(StatManual)
270269
export(StatQq)
271270
export(StatQqLine)
272271
export(StatQuantile)
@@ -426,6 +425,7 @@ export(get_alt_text)
426425
export(get_element_tree)
427426
export(get_geom_defaults)
428427
export(get_guide_data)
428+
export(get_labs)
429429
export(get_last_plot)
430430
export(get_layer_data)
431431
export(get_layer_grob)
@@ -463,10 +463,22 @@ export(guide_transform)
463463
export(guides)
464464
export(has_flipped_aes)
465465
export(is.Coord)
466+
export(is.coord)
466467
export(is.facet)
468+
export(is.geom)
467469
export(is.ggplot)
468470
export(is.ggproto)
471+
export(is.guide)
472+
export(is.guides)
473+
export(is.layer)
474+
export(is.mapping)
475+
export(is.margin)
476+
export(is.position)
477+
export(is.scale)
478+
export(is.stat)
469479
export(is.theme)
480+
export(is.theme_element)
481+
export(is.waiver)
470482
export(label_both)
471483
export(label_bquote)
472484
export(label_context)
@@ -484,6 +496,8 @@ export(layer_sf)
484496
export(lims)
485497
export(map_data)
486498
export(margin)
499+
export(margin_auto)
500+
export(margin_part)
487501
export(max_height)
488502
export(max_width)
489503
export(mean_cl_boot)
@@ -678,6 +692,7 @@ export(stat_ecdf)
678692
export(stat_ellipse)
679693
export(stat_function)
680694
export(stat_identity)
695+
export(stat_manual)
681696
export(stat_qq)
682697
export(stat_qq_line)
683698
export(stat_quantile)
@@ -710,7 +725,19 @@ export(theme_linedraw)
710725
export(theme_minimal)
711726
export(theme_replace)
712727
export(theme_set)
728+
export(theme_sub_axis)
729+
export(theme_sub_axis_bottom)
730+
export(theme_sub_axis_left)
731+
export(theme_sub_axis_right)
732+
export(theme_sub_axis_top)
733+
export(theme_sub_axis_x)
734+
export(theme_sub_axis_y)
735+
export(theme_sub_legend)
736+
export(theme_sub_panel)
737+
export(theme_sub_plot)
738+
export(theme_sub_strip)
713739
export(theme_test)
740+
export(theme_transparent)
714741
export(theme_update)
715742
export(theme_void)
716743
export(transform_position)

NEWS.md

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

33
* More stability for vctrs-based palettes (@teunbrand, #6117).
4+
* Fixed regression in `guide_bins(reverse = TRUE)` (@teunbrand, #6183).
5+
* New function family for setting parts of a theme. For example, you can now use
6+
`theme_sub_axis(line, text, ticks, ticks.length, line)` as a substitute for
7+
`theme(axis.line, axis.text, axis.ticks, axis.ticks.length, axis.line)`. This
8+
should allow slightly terser and more organised theme declarations
9+
(@teunbrand, #5301).
10+
* `scale_{x/y}_discrete(continuous.limits)` is a new argument to control the
11+
display range of discrete scales (@teunbrand, #4174, #6259).
12+
* `geom_ribbon()` now appropriately warns about, and removes, missing values
13+
(@teunbrand, #6243).
14+
* `guide_*()` can now accept two inside legend theme elements:
15+
`legend.position.inside` and `legend.justification.inside`, allowing inside
16+
legends to be placed at different positions. Only inside legends with the same
17+
position and justification will be merged (@Yunuuuu, #6210).
18+
* New stat: `stat_manual()` for arbitrary computations (@teunbrand, #3501)
19+
* Reversal of a dimension, typically 'x' or 'y', is now controlled by the
20+
`reverse` argument in `coord_cartesian()`, `coord_fixed()`, `coord_radial()`
21+
and `coord_sf()`. In `coord_radial()`, this replaces the older `direction`
22+
argument (#4021, @teunbrand).
23+
* `coord_radial()` displays minor gridlines now (@teunbrand).
24+
* (internal) `continuous_scale()` and `binned_scale()` sort the `limits`
25+
argument internally (@teunbrand).
26+
* Theme margins can have NA-units to inherit from parent elements. The new
27+
function `margin_part()` has NA-units as default (@teunbrand, #6115)
28+
* New `margin_auto()` specification for theme margins.
29+
* New argument `labs(dictionary)` to label based on variable name rather than
30+
based on aesthetic (@teunbrand, #5178)
31+
* Fixed bug in out-of-bounds binned breaks (@teunbrand, #6054)
32+
* Binned guides now accept expressions as labels (@teunbrand, #6005)
33+
* (internal) `Scale$get_labels()` format expressions as lists.
34+
* In non-orthogonal coordinate systems (`coord_sf()`, `coord_polar()` and
35+
`coord_radial()`), using 'AsIs' variables escape transformation when
36+
both `x` and `y` is an 'AsIs' variable (@teunbrand, #6205).
37+
* The following methods have been deprecated: `fortify.lm()`, `fortify.glht()`,
38+
`fortify.confint.glht()`, `fortify.summary.glht()` and `fortify.cld()`. It
39+
is recommend to use `broom::augment()` and `broom::tidy()` instead
40+
(@teunbrand, #3816).
41+
* Custom and raster annotation now respond to scale transformations, and can
42+
use AsIs variables for relative placement (@teunbrand based on
43+
@yutannihilation's prior work, #3120)
44+
* When discrete breaks have names, they'll be used as labels by default
45+
(@teunbrand, #6147).
46+
* The helper function `is.waiver()` is now exported to help extensions to work
47+
with `waiver()` objects (@arcresu, #6173).
48+
* Date(time) scales now throw appropriate errors when `date_breaks`,
49+
`date_minor_breaks` or `date_labels` are not strings (@RodDalBen, #5880)
50+
* `geom_errorbarh()` is deprecated in favour of
51+
`geom_errorbar(orientation = "y")` (@teunbrand, #5961).
52+
* `geom_contour()` should be able to recognise a rotated grid of points
53+
(@teunbrand, #4320)
54+
* `geom_boxplot()` gains additional arguments to style the colour, linetype and
55+
linewidths of the box, whiskers, median line and staples (@teunbrand, #5126)
56+
* `geom_violin()` gains additional arguments to style the colour, linetype and
57+
linewidths of the quantiles, which replace the now-deprecated `draw_quantiles`
58+
argument (#5912).
59+
* (breaking) `geom_violin(quantiles)` now has actual quantiles based on
60+
the data, rather than inferred quantiles based on the computed density. The
61+
`quantiles` parameter that replaces `draw_quantiles` now belongs to
62+
`stat_ydensity()` instead of `geom_violin()` (@teunbrand, #4120).
63+
* (internal) Using `after_scale()` in the `Geom*$default_aes()` field is now
64+
evaluated in the context of data (@teunbrand, #6135)
65+
* Fixed bug where binned scales wouldn't simultaneously accept transformations
66+
and function-limits (@teunbrand, #6144).
67+
* Fixed bug where the `ggplot2::`-prefix did not work with `stage()`
68+
(@teunbrand, #6104).
69+
* New `get_labs()` function for retrieving completed plot labels
70+
(@teunbrand, #6008).
471
* Built-in `theme_*()` functions now have `ink` and `paper` arguments to control
572
foreground and background colours respectively (@teunbrand)
673
* The `summary()` method for ggplots is now more terse about facets
@@ -181,6 +248,22 @@
181248
* The ellipsis argument is now checked in `fortify()`, `get_alt_text()`,
182249
`labs()` and several guides (@teunbrand, #3196).
183250
* `stat_summary_bin()` no longer ignores `width` parameter (@teunbrand, #4647).
251+
* Added `keep.zeroes` argument to `stat_bin()` (@teunbrand, #3449)
252+
* (internal) removed barriers for using 2D structures as aesthetics
253+
(@teunbrand, #4189).
254+
* `coord_sf()` no longer errors when dealing with empty graticules (@teunbrand, #6052)
255+
* Added `theme_transparent()` with transparent backgrounds (@topepo).
256+
* New theme elements `palette.{aes}.discrete` and `palette.{aes}.continuous`.
257+
Theme palettes replace palettes in scales where `palette = NULL`, which is
258+
the new default in many scales (@teunbrand, #4696).
259+
* `guide_axis()` no longer reserves space for blank ticks
260+
(@teunbrand, #4722, #6069).
261+
* `geom_abline()` clips to the panel range in the vertical direction too
262+
(@teunbrand, #6086).
263+
* Added `panel.widths` and `panel.heights` to `theme()` (#5338, @teunbrand).
264+
* Standardised the calculation of `width`, which are now implemented as
265+
aesthetics (@teunbrand, #2800).
266+
* Stricter check on `register_theme_elements(element_tree)` (@teunbrand, #6162)
184267

185268
# ggplot2 3.5.1
186269

@@ -227,6 +310,7 @@ documentation updates.
227310
* `annotate()` now warns about `stat` or `position` arguments (@teunbrand, #5151)
228311
* `guide_coloursteps(even.steps = FALSE)` now works with discrete data that has
229312
been formatted by `cut()` (@teunbrand, #3877).
313+
* `ggsave()` now offers to install svglite if needed (@eliocamp, #6166).
230314

231315
# ggplot2 3.5.0
232316

0 commit comments

Comments
 (0)