Skip to content

Commit e1cdee0

Browse files
authored
Merge pull request #6403 from tidyverse/rc/3.5.2
Release 3.5.2
2 parents 5b0ea0b + ec9e909 commit e1cdee0

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

+2921
-25856
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: ggplot2
2+
Version: 3.5.2.9000
23
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")),

NAMESPACE

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ export(element_geom)
352352
export(element_grob)
353353
export(element_line)
354354
export(element_point)
355-
export(element_polygon)
356355
export(element_rect)
357356
export(element_render)
358357
export(element_text)
@@ -470,22 +469,26 @@ export(guide_transform)
470469
export(guides)
471470
export(has_flipped_aes)
472471
export(is.Coord)
473-
export(is.coord)
474472
export(is.facet)
475-
export(is.geom)
476473
export(is.ggplot)
477474
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)
486475
export(is.theme)
487-
export(is.theme_element)
488476
export(is.waiver)
477+
export(is_coord)
478+
export(is_facet)
479+
export(is_geom)
480+
export(is_ggplot)
481+
export(is_ggproto)
482+
export(is_guide)
483+
export(is_guides)
484+
export(is_layer)
485+
export(is_mapping)
486+
export(is_margin)
487+
export(is_position)
488+
export(is_scale)
489+
export(is_stat)
490+
export(is_theme)
491+
export(is_theme_element)
489492
export(label_both)
490493
export(label_bquote)
491494
export(label_context)

NEWS.md

Lines changed: 753 additions & 733 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)