From c8df82186fd0392e3acc32db4e7cae15a79ca488 Mon Sep 17 00:00:00 2001 From: Achim Zeileis Date: Tue, 24 Feb 2026 14:20:38 +0100 Subject: [PATCH 1/2] in case of no facets, just use the full data for xfree/yfree --- R/facet.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/facet.R b/R/facet.R index 9183a680..fde5f529 100644 --- a/R/facet.R +++ b/R/facet.R @@ -309,8 +309,8 @@ draw_facet_window = function( if (isTRUE(facet.args[["free"]])) { # First, we need to calculate the plot extent and axes range of each # individual facet. - xfree = split(c(x, xmin, xmax), facet)[[ii]] - yfree = split(c(y, ymin, ymax), facet)[[ii]] + xfree = if (!is.null(facet)) split(c(x, xmin, xmax), facet)[[ii]] else c(x, xmin, xmax) + yfree = if (!is.null(facet)) split(c(y, ymin, ymax), facet)[[ii]] else c(y, ymin, ymax) if (null_xlim) xlim = range(xfree, na.rm = TRUE) if (null_ylim) ylim = range(yfree, na.rm = TRUE) xext = extendrange(xlim, f = 0.04) From 8b4641801262bfa6fbcb10c0973995470fd808d1 Mon Sep 17 00:00:00 2001 From: Achim Zeileis Date: Tue, 24 Feb 2026 14:34:32 +0100 Subject: [PATCH 2/2] add NEWS item --- NEWS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index d23c0b8d..18aa4a96 100644 --- a/NEWS.md +++ b/NEWS.md @@ -32,6 +32,9 @@ where the formatting is also better._ - Fixed Issue #545 where xaxs/yaxs were not restored when set by an internal function. (#545 @zeileis) +- Fixed Issue #553 where `facet.args = list(free = TRUE)` lead to an error when used + used without facets (#554 @zeileis) + ### Breaking changes ## v0.6.0