Skip to content

Commit 295e36c

Browse files
committed
resolve merge conflict
Merge branch 'main' into boilerplates # Conflicts: # R/geom-bar.R # R/geom-point.R # R/geom-pointrange.R # R/geom-rug.R # R/geom-segment.R # R/geom-tile.R # R/geom-violin.R # R/stat-bin.R # R/stat-bin2d.R # R/stat-binhex.R # R/stat-ellipse.R # R/stat-qq-line.R # R/stat-summary-2d.R # R/stat-ydensity.R # man/geom_bin_2d.Rd # man/geom_hex.Rd # man/geom_histogram.Rd # man/geom_linerange.Rd # man/geom_violin.Rd # man/stat_summary_2d.Rd
2 parents 52e66f2 + 1bfb3c9 commit 295e36c

File tree

265 files changed

+5884
-2091
lines changed

Some content is hidden

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

265 files changed

+5884
-2091
lines changed

DESCRIPTION

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ Collate:
243243
'scales-.R'
244244
'stat-align.R'
245245
'stat-bin.R'
246+
'stat-summary-2d.R'
246247
'stat-bin2d.R'
247248
'stat-bindot.R'
248249
'stat-binhex.R'
@@ -255,6 +256,7 @@ Collate:
255256
'stat-ellipse.R'
256257
'stat-function.R'
257258
'stat-identity.R'
259+
'stat-manual.R'
258260
'stat-qq-line.R'
259261
'stat-qq.R'
260262
'stat-quantilemethods.R'
@@ -263,7 +265,6 @@ Collate:
263265
'stat-smooth-methods.R'
264266
'stat-smooth.R'
265267
'stat-sum.R'
266-
'stat-summary-2d.R'
267268
'stat-summary-bin.R'
268269
'stat-summary-hex.R'
269270
'stat-summary.R'
@@ -274,6 +275,7 @@ Collate:
274275
'theme.R'
275276
'theme-defaults.R'
276277
'theme-current.R'
278+
'theme-sub.R'
277279
'utilities-break.R'
278280
'utilities-grid.R'
279281
'utilities-help.R'

NAMESPACE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ S3method(c,mapped_discrete)
2020
S3method(drawDetails,zeroGrob)
2121
S3method(element_grob,element_blank)
2222
S3method(element_grob,element_line)
23+
S3method(element_grob,element_point)
24+
S3method(element_grob,element_polygon)
2325
S3method(element_grob,element_rect)
2426
S3method(element_grob,element_text)
2527
S3method(format,ggproto)
@@ -96,6 +98,7 @@ S3method(make_constructor,Stat)
9698
S3method(merge_element,default)
9799
S3method(merge_element,element)
98100
S3method(merge_element,element_blank)
101+
S3method(merge_element,margin)
99102
S3method(pattern_alpha,GridPattern)
100103
S3method(pattern_alpha,GridTilingPattern)
101104
S3method(pattern_alpha,default)
@@ -266,6 +269,7 @@ export(StatEcdf)
266269
export(StatEllipse)
267270
export(StatFunction)
268271
export(StatIdentity)
272+
export(StatManual)
269273
export(StatQq)
270274
export(StatQqLine)
271275
export(StatQuantile)
@@ -346,6 +350,8 @@ export(element_blank)
346350
export(element_geom)
347351
export(element_grob)
348352
export(element_line)
353+
export(element_point)
354+
export(element_polygon)
349355
export(element_rect)
350356
export(element_render)
351357
export(element_text)
@@ -497,6 +503,8 @@ export(lims)
497503
export(make_constructor)
498504
export(map_data)
499505
export(margin)
506+
export(margin_auto)
507+
export(margin_part)
500508
export(max_height)
501509
export(max_width)
502510
export(mean_cl_boot)
@@ -691,6 +699,7 @@ export(stat_ecdf)
691699
export(stat_ellipse)
692700
export(stat_function)
693701
export(stat_identity)
702+
export(stat_manual)
694703
export(stat_qq)
695704
export(stat_qq_line)
696705
export(stat_quantile)
@@ -723,7 +732,19 @@ export(theme_linedraw)
723732
export(theme_minimal)
724733
export(theme_replace)
725734
export(theme_set)
735+
export(theme_sub_axis)
736+
export(theme_sub_axis_bottom)
737+
export(theme_sub_axis_left)
738+
export(theme_sub_axis_right)
739+
export(theme_sub_axis_top)
740+
export(theme_sub_axis_x)
741+
export(theme_sub_axis_y)
742+
export(theme_sub_legend)
743+
export(theme_sub_panel)
744+
export(theme_sub_plot)
745+
export(theme_sub_strip)
726746
export(theme_test)
747+
export(theme_transparent)
727748
export(theme_update)
728749
export(theme_void)
729750
export(transform_position)

NEWS.md

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,64 @@
11
# ggplot2 (development version)
22

3+
* New parameters for `geom_label()` (@teunbrand and @steveharoz, #5365):
4+
* The `linewidth` aesthetic is now applied and replaces the `label.size`
5+
argument.
6+
* The `linetype` aesthetic is now applied.
7+
* New `border.colour` argument to set the colour of borders.
8+
* New `text.colour` argument to set the colour of text.
9+
* New `element_point()` and `element_polygon()` that can be given to
10+
`theme(point, polygon)` as an extension point (@teunbrand, #6248).
11+
* Turned off fallback for `size` to `linewidth` translation in
12+
`geom_bar()`/`geom_col()` (#4848).
13+
* `coord_radial()` now displays no axis instead of throwing an error when
14+
a scale has no breaks (@teunbrand, #6271).
15+
* The `fatten` argument has been deprecated in `geom_boxplot()`,
16+
`geom_crossbar()` and `geom_pointrange()` (@teunbrand, #4881).
17+
* Axis labels are now preserved better when using `coord_sf(expand = TRUE)` and
18+
graticule lines are straight but do not meet the edge (@teunbrand, #2985).
19+
* Attempt to boost detail in `coord_polar()` and `coord_radial()` near the
20+
center (@teunbrand, #5023)
21+
* Scale names, guide titles and aesthetic labels can now accept functions
22+
(@teunbrand, #4313)
23+
* Binned scales with zero-width data expand the default limits by 0.1
24+
(@teunbrand, #5066)
25+
* New default `geom_qq_line(geom = "abline")` for better clipping in the
26+
vertical direction. In addition, `slope` and `intercept` are new computed
27+
variables in `stat_qq_line()` (@teunbrand, #6087).
28+
* Position adjustments can now have auxiliary aesthetics (@teunbrand).
29+
* `position_nudge()` gains `nudge_x` and `nudge_y` aesthetics (#3026, #5445).
30+
* `position_dodge()` gains `order` aesthetic (#3022, #3345)
31+
* More stability for vctrs-based palettes (@teunbrand, #6117).
32+
* Fixed regression in `guide_bins(reverse = TRUE)` (@teunbrand, #6183).
33+
* New function family for setting parts of a theme. For example, you can now use
34+
`theme_sub_axis(line, text, ticks, ticks.length, line)` as a substitute for
35+
`theme(axis.line, axis.text, axis.ticks, axis.ticks.length, axis.line)`. This
36+
should allow slightly terser and more organised theme declarations
37+
(@teunbrand, #5301).
38+
* `scale_{x/y}_discrete(continuous.limits)` is a new argument to control the
39+
display range of discrete scales (@teunbrand, #4174, #6259).
40+
* `geom_ribbon()` now appropriately warns about, and removes, missing values
41+
(@teunbrand, #6243).
42+
* `guide_*()` can now accept two inside legend theme elements:
43+
`legend.position.inside` and `legend.justification.inside`, allowing inside
44+
legends to be placed at different positions. Only inside legends with the same
45+
position and justification will be merged (@Yunuuuu, #6210).
46+
* New stat: `stat_manual()` for arbitrary computations (@teunbrand, #3501)
47+
* Reversal of a dimension, typically 'x' or 'y', is now controlled by the
48+
`reverse` argument in `coord_cartesian()`, `coord_fixed()`, `coord_radial()`
49+
and `coord_sf()`. In `coord_radial()`, this replaces the older `direction`
50+
argument (#4021, @teunbrand).
51+
* `coord_radial()` displays minor gridlines now (@teunbrand).
52+
* (internal) `continuous_scale()` and `binned_scale()` sort the `limits`
53+
argument internally (@teunbrand).
54+
* Theme margins can have NA-units to inherit from parent elements. The new
55+
function `margin_part()` has NA-units as default (@teunbrand, #6115)
56+
* New `margin_auto()` specification for theme margins.
57+
* New argument `labs(dictionary)` to label based on variable name rather than
58+
based on aesthetic (@teunbrand, #5178)
59+
* Fixed bug in out-of-bounds binned breaks (@teunbrand, #6054)
60+
* Binned guides now accept expressions as labels (@teunbrand, #6005)
61+
* (internal) `Scale$get_labels()` format expressions as lists.
362
* In non-orthogonal coordinate systems (`coord_sf()`, `coord_polar()` and
463
`coord_radial()`), using 'AsIs' variables escape transformation when
564
both `x` and `y` is an 'AsIs' variable (@teunbrand, #6205).
@@ -22,6 +81,13 @@
2281
(@teunbrand, #4320)
2382
* `geom_boxplot()` gains additional arguments to style the colour, linetype and
2483
linewidths of the box, whiskers, median line and staples (@teunbrand, #5126)
84+
* `geom_violin()` gains additional arguments to style the colour, linetype and
85+
linewidths of the quantiles, which replace the now-deprecated `draw_quantiles`
86+
argument (#5912).
87+
* (breaking) `geom_violin(quantiles)` now has actual quantiles based on
88+
the data, rather than inferred quantiles based on the computed density. The
89+
`quantiles` parameter that replaces `draw_quantiles` now belongs to
90+
`stat_ydensity()` instead of `geom_violin()` (@teunbrand, #4120).
2591
* (internal) Using `after_scale()` in the `Geom*$default_aes()` field is now
2692
evaluated in the context of data (@teunbrand, #6135)
2793
* Fixed bug where binned scales wouldn't simultaneously accept transformations
@@ -210,8 +276,36 @@
210276
* The ellipsis argument is now checked in `fortify()`, `get_alt_text()`,
211277
`labs()` and several guides (@teunbrand, #3196).
212278
* `stat_summary_bin()` no longer ignores `width` parameter (@teunbrand, #4647).
213-
* Added `keep.zeroes` argument to `stat_bin()` (@teunbrand, #3449)
279+
* Reintroduced `drop` argument to `stat_bin()` (@teunbrand, #3449)
280+
* (internal) removed barriers for using 2D structures as aesthetics
281+
(@teunbrand, #4189).
214282
* `coord_sf()` no longer errors when dealing with empty graticules (@teunbrand, #6052)
283+
* Added `theme_transparent()` with transparent backgrounds (@topepo).
284+
* New theme elements `palette.{aes}.discrete` and `palette.{aes}.continuous`.
285+
Theme palettes replace palettes in scales where `palette = NULL`, which is
286+
the new default in many scales (@teunbrand, #4696).
287+
* `guide_axis()` no longer reserves space for blank ticks
288+
(@teunbrand, #4722, #6069).
289+
* `geom_abline()` clips to the panel range in the vertical direction too
290+
(@teunbrand, #6086).
291+
* Added `panel.widths` and `panel.heights` to `theme()` (#5338, @teunbrand).
292+
* Standardised the calculation of `width`, which are now implemented as
293+
aesthetics (@teunbrand, #2800).
294+
* Stricter check on `register_theme_elements(element_tree)` (@teunbrand, #6162)
295+
* Added `weight` aesthetic for `stat_ellipse()` (@teunbrand, #5272)
296+
* Fixed a bug where the `guide_custom(order)` wasn't working (@teunbrand, #6195)
297+
* All binning stats now use the `boundary`/`center` parametrisation rather
298+
than `origin`, following in `stat_bin()`'s footsteps (@teunbrand).
299+
* `stat_summary_2d()` and `stat_bin_2d()` now deal with zero-range data
300+
more elegantly (@teunbrand, #6207).
301+
* Munching in `coord_polar()` and `coord_radial()` now adds more detail,
302+
particularly for data-points with a low radius near the center
303+
(@teunbrand, #5023).
304+
* All scales now expose the `aesthetics` parameter (@teunbrand, #5841)
305+
* New `theme(legend.key.justification)` to control the alignment of legend keys
306+
(@teunbrand, #3669).
307+
* Added `scale_{x/y}_time(date_breaks, date_minor_breaks, date_labels)`
308+
(@teunbrand, #4335).
215309

216310
# ggplot2 3.5.1
217311

R/aes.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ NULL
3838
#'
3939
#' [Delayed evaluation][aes_eval] for working with computed variables.
4040
#'
41+
#' @note
42+
#' Using `I()` to create objects of class 'AsIs' causes scales to ignore the
43+
#' variable and assumes the wrapped variable is direct input for the grid
44+
#' package. Please be aware that variables are sometimes combined, like in
45+
#' some stats or position adjustments, that may yield unexpected results with
46+
#' 'AsIs' variables.
47+
#'
4148
#' @family aesthetics documentation
4249
#' @return A list with class `uneval`. Components of the list are either
4350
#' quosures or constants.

R/axis-secondary.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ AxisSecondary <- ggproto("AxisSecondary", NULL,
329329
scale$train(range)
330330
scale
331331
},
332-
make_title = function(title) {
333-
title
332+
make_title = function(...) {
333+
ScaleContinuous$make_title(...)
334334
}
335335
)

0 commit comments

Comments
 (0)