From fb9b4130e4a1977c813368208ad44e217be1fea0 Mon Sep 17 00:00:00 2001 From: phispu Date: Thu, 15 Aug 2024 14:21:20 -0700 Subject: [PATCH 1/2] Added gg class to labs(). Fixes #5553. --- R/labels.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/labels.R b/R/labels.R index 2bc5551034..7662153e91 100644 --- a/R/labels.R +++ b/R/labels.R @@ -139,7 +139,7 @@ labs <- function(..., title = waiver(), subtitle = waiver(), caption = waiver(), args <- args[!duplicated(names(args))] args <- rename_aes(args) - structure(args, class = "labels") + structure(args, class = c("labels", "gg")) } #' @rdname labs From 6d7b2a42dd67835f6fde63b6fe34f74cfb126133 Mon Sep 17 00:00:00 2001 From: phispu Date: Thu, 15 Aug 2024 15:08:34 -0700 Subject: [PATCH 2/2] Added gg class to labs(). Fixes #5553. --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 4c0ea1e891..285399407e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # ggplot2 (development version) +* Added `gg` class to `labs()` (@phispu, #5553). * Missing values from discrete palettes are no longer translated (@teunbrand, #5929). * Fixed bug in `facet_grid(margins = TRUE)` when using expresssions