From 1662828da9a215f3a93b04dd90098b8b9cf9e3ac Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Wed, 23 Sep 2026 17:14:37 -0700 Subject: [PATCH 1/2] free facet should be asp aware --- R/facet.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/facet.R b/R/facet.R index 54477d80..a59fb447 100644 --- a/R/facet.R +++ b/R/facet.R @@ -554,6 +554,12 @@ draw_facet_window = function( } fusr = get(".fusr", envir = get(".tinyplot_env", envir = parent.env(environment()))) fusr[[ii]] = c(xext, yext) + # Honour `asp` by letting plot.window() widen the (already padded) + # extent to the panel's aspect ratio, and record the result. (#555) + if (!is.null(asp) && is.finite(asp) && asp > 0) { + plot.window(xlim = xext, ylim = yext, asp = asp, xaxs = "i", yaxs = "i") + fusr[[ii]] = par("usr") + } assign(".fusr", fusr, envir = get(".tinyplot_env", envir = parent.env(environment()))) # Explicitly set (override) the current facet extent par(usr = fusr[[ii]]) From c4c29a0a125a58b83e512c3a4f7050abe900ae4b Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Wed, 23 Sep 2026 17:16:15 -0700 Subject: [PATCH 2/2] news --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index 6b4f5e08..e6ed5ab7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -237,6 +237,8 @@ related to plot layering. See "Bug fixes" below. ### Bug fixes +- Free facets (`facet.args = list(free = TRUE)`) now respect `asp`. + (#744 @grantmcdermott) - Multi-line x-axis tick labels (e.g. `"Hello\nWorld"`) are now spaced correctly under dynamic themes. (#742 @grantmcdermott) - `type_lm()`, `type_glm()` and `type_loess()` now space their prediction grid