From 51d8e278cce68b07fe1d03b50283600cdcc01446 Mon Sep 17 00:00:00 2001 From: mitchelloharawild Date: Mon, 13 May 2024 00:34:45 +1000 Subject: [PATCH] Fix gg_season() showing multiple final breaks for yearmonth() --- R/graphics.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/graphics.R b/R/graphics.R index a05c01c7..26432839 100644 --- a/R/graphics.R +++ b/R/graphics.R @@ -338,7 +338,7 @@ gg_season <- function(data, y = NULL, period = NULL, facet_period = NULL, p <- p + scale_fn( breaks = function(limit){ breaks <- if(suppressMessages(len <- period/ts_interval) <= 12){ - ggplot2::scale_x_date()$trans$breaks(as.Date(limit), n = len) + vctrs::vec_restore(ggplot2::scale_x_date()$trans$breaks(as.Date(limit), n = len), limit) } else{ scale_fn()$trans$breaks(limit) }