Skip to content

Commit 63ca94e

Browse files
authored
Merge pull request #6418 from tidyverse/rc/3.5.2
Redo merge of hot fix 3.5.2 into main
2 parents 5b0ea0b + 3e84233 commit 63ca94e

Some content is hidden

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

57 files changed

+1305
-23644
lines changed

DESCRIPTION

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: ggplot2
22
Title: Create Elegant Data Visualisations Using the Grammar of Graphics
3-
Version: 3.5.1.9000
3+
Version: 3.5.2.9000
44
Authors@R: c(
55
person("Hadley", "Wickham", , "hadley@posit.co", role = "aut",
66
comment = c(ORCID = "0000-0003-4757-117X")),
@@ -31,7 +31,7 @@ URL: https://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2
3131
BugReports: https://github.com/tidyverse/ggplot2/issues
3232
Depends:
3333
R (>= 4.0)
34-
Imports:
34+
Imports:
3535
cli,
3636
grDevices,
3737
grid,
@@ -70,9 +70,9 @@ Suggests:
7070
tibble,
7171
vdiffr (>= 1.0.6),
7272
xml2
73-
Enhances:
73+
Enhances:
7474
sp
75-
VignetteBuilder:
75+
VignetteBuilder:
7676
knitr
7777
Config/Needs/website: ggtext, tidyr, forcats, tidyverse/tidytemplate
7878
Config/testthat/edition: 3
@@ -81,7 +81,7 @@ Encoding: UTF-8
8181
LazyData: true
8282
Roxygen: list(markdown = TRUE)
8383
RoxygenNote: 7.3.2
84-
Collate:
84+
Collate:
8585
'ggproto.R'
8686
'ggplot-global.R'
8787
'aaa-.R'

NAMESPACE

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -470,22 +470,26 @@ export(guide_transform)
470470
export(guides)
471471
export(has_flipped_aes)
472472
export(is.Coord)
473-
export(is.coord)
474473
export(is.facet)
475-
export(is.geom)
476474
export(is.ggplot)
477475
export(is.ggproto)
478-
export(is.guide)
479-
export(is.guides)
480-
export(is.layer)
481-
export(is.mapping)
482-
export(is.margin)
483-
export(is.position)
484-
export(is.scale)
485-
export(is.stat)
486476
export(is.theme)
487-
export(is.theme_element)
488477
export(is.waiver)
478+
export(is_coord)
479+
export(is_facet)
480+
export(is_geom)
481+
export(is_ggplot)
482+
export(is_ggproto)
483+
export(is_guide)
484+
export(is_guides)
485+
export(is_layer)
486+
export(is_mapping)
487+
export(is_margin)
488+
export(is_position)
489+
export(is_scale)
490+
export(is_stat)
491+
export(is_theme)
492+
export(is_theme_element)
489493
export(label_both)
490494
export(label_bquote)
491495
export(label_context)

NEWS.md

Lines changed: 841 additions & 827 deletions
Large diffs are not rendered by default.

R/aes.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ aes <- function(x, y, ...) {
111111

112112
#' @export
113113
#' @rdname is_tests
114-
is.mapping <- function(x) inherits(x, "uneval")
114+
is_mapping <- function(x) inherits(x, "uneval")
115115

116116
# Wrap symbolic objects in quosures but pull out constants out of
117117
# quosures for backward-compatibility

R/bin.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ compute_bins <- function(x, scale = NULL, breaks = NULL, binwidth = NULL, bins =
120120
center = NULL, boundary = NULL,
121121
closed = c("right", "left")) {
122122

123-
range <- if (is.scale(scale)) scale$dimension() else range(x)
123+
range <- if (is_scale(scale)) scale$dimension() else range(x)
124124
check_length(range, 2L)
125125

126126
if (!is.null(breaks)) {
127127
breaks <- allow_lambda(breaks)
128128
if (is.function(breaks)) {
129129
breaks <- breaks(x)
130130
}
131-
if (is.scale(scale) && !scale$is_discrete()) {
131+
if (is_scale(scale) && !scale$is_discrete()) {
132132
breaks <- scale$transform(breaks)
133133
}
134134
check_numeric(breaks)

R/coord-.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,17 +225,16 @@ Coord <- ggproto("Coord",
225225
}
226226
)
227227

228-
229228
#' @export
230229
#' @rdname is_tests
231-
is.coord <- function(x) inherits(x, "Coord")
230+
is_coord <- function(x) inherits(x, "Coord")
232231

233232
#' @export
234233
#' @rdname is_tests
235234
#' @usage is.Coord(x) # Deprecated
236235
is.Coord <- function(x) {
237-
deprecate_soft0("3.5.2", "is.Coord()", "is.coord()")
238-
is.coord(x)
236+
deprecate_soft0("3.5.2", "is.Coord()", "is_coord()")
237+
is_coord(x)
239238
}
240239

241240
# Renders an axis with the correct orientation or zeroGrob if no axis should be

R/coord-cartesian-.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ view_scales_from_scale <- function(scale, coord_limits = NULL, expand = TRUE) {
165165
}
166166

167167
panel_guides_grob <- function(guides, position, theme, labels = NULL) {
168-
if (!is.guides(guides)) {
168+
if (!is_guides(guides)) {
169169
return(zeroGrob())
170170
}
171171
pair <- guides$get_position(position)

R/facet-.R

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ NULL
99
#' rendered.
1010
#'
1111
#' Extending facets can range from the simple modifications of current facets,
12-
#' to very laborious rewrites with a lot of [gtable()] manipulation.
13-
#' For some examples of both, please see the extension vignette.
12+
#' to very laborious rewrites with a lot of [`gtable()`][gtable::gtable()]
13+
#' manipulation. For some examples of both, please see the extension vignette.
1414
#'
1515
#' `Facet` subclasses, like other extendible ggproto classes, have a range
1616
#' of methods that can be modified. Some of these are required for all new
@@ -49,7 +49,7 @@ NULL
4949
#'
5050
#' - `setup_panel_params`: modifies the x and y ranges for each panel. This is
5151
#' used to allow the `Facet` to interact with the `panel_params`.
52-
#'
52+
#'
5353
#' - `init_scales`: Given a master scale for x and y, create panel
5454
#' specific scales for each panel defined in the layout. The default is to
5555
#' simply clone the master scale.
@@ -318,10 +318,6 @@ Facet <- ggproto("Facet", NULL,
318318
}
319319
)
320320

321-
#' @export
322-
#' @rdname is_tests
323-
is.facet <- function(x) inherits(x, "Facet")
324-
325321
# Helpers -----------------------------------------------------------------
326322

327323
#' Quote faceting variables
@@ -383,6 +379,18 @@ vars <- function(...) {
383379
quos(...)
384380
}
385381

382+
#' @export
383+
#' @rdname is_tests
384+
is_facet <- function(x) inherits(x, "Facet")
385+
386+
#' @export
387+
#' @rdname is_tests
388+
#' @usage is.facet(x) # Deprecated
389+
is.facet <- function(x) {
390+
deprecate_soft0("3.5.2", "is.facet()", "is_facet()")
391+
is_facet(x)
392+
}
393+
386394
#' Accessing a plot's facet strip labels
387395
#'
388396
#' This functions retrieves labels from facet strips with the labeller applied.
@@ -493,7 +501,7 @@ as_facets_list <- function(x) {
493501
}
494502

495503
check_vars <- function(x) {
496-
if (is.mapping(x)) {
504+
if (is_mapping(x)) {
497505
cli::cli_abort("Please use {.fn vars} to supply facet variables.")
498506
}
499507
# Native pipe have higher precedence than + so any type of gg object can be

R/fortify.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fortify.default <- function(model, data, ...) {
9494
"or an object coercible by {.fn fortify}, or a valid ",
9595
"{.cls data.frame}-like object coercible by {.fn as.data.frame}"
9696
)
97-
if (is.mapping(model)) {
97+
if (is_mapping(model)) {
9898
msg <- c(
9999
paste0(msg, ", not ", obj_type_friendly(model), "."),
100100
"i" = "Did you accidentally pass {.fn aes} to the {.arg data} argument?"

R/geom-.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ Geom <- ggproto("Geom",
237237

238238
#' @export
239239
#' @rdname is_tests
240-
is.geom <- function(x) inherits(x, "Geom")
240+
is_geom <- function(x) inherits(x, "Geom")
241241

242242
eval_from_theme <- function(aesthetics, theme, class = NULL) {
243243
themed <- is_themed_aes(aesthetics)

0 commit comments

Comments
 (0)