From b7a1541cf0c96efc28b2048f80f3a2ca1da6ac37 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Fri, 15 May 2026 11:00:33 -0700 Subject: [PATCH 1/5] fix(facet): first attempt --- R/facet.R | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/R/facet.R b/R/facet.R index 9c961200..5b8ae963 100644 --- a/R/facet.R +++ b/R/facet.R @@ -107,9 +107,9 @@ draw_facet_window = function( ooma = par("oma") # Bump top margin down for facet titles - fmar[3] = fmar[3] + 1 + fmar[3] = fmar[3] + facet_text / cex_fct_adj if (isTRUE(attr(facet, "facet_grid"))) { - fmar[3] = max(0, fmar[3] - 1) + fmar[3] = max(0, fmar[3] - facet_text / cex_fct_adj) # Indent for RHS facet_grid title strip if "right!" legend if (has_legend && ooma[4] > 0) ooma[4] = ooma[4] + 1 } @@ -124,18 +124,10 @@ draw_facet_window = function( # reset by the before.plot.new hook. side.sub = get_tpar("side.sub", tpar_list = tpars, default = 3) omar = dynmar_computed - # Under facets, main/sub sit ABOVE the top facet strip. Bump the - # outer top margin by the strip height so sub doesn't collide with - # the strip. fmar[3] already captures facet_newlines and the - # facet_grid adjustment; add back the 0.5 line that was stripped - # when frame.plot is FALSE (that reduction is meant to tighten - # inter-panel gaps, not the top strip). - strip_bump = fmar[3] - if (isFALSE(frame.plot) && !isTRUE(facet.args[["free"]])) { - strip_bump = strip_bump + 0.5 - } - omar[3] = omar[3] + strip_bump - + omar[3] = dynmar_computed[3] + (1 + facet_newlines + 0.1) * facet_text + # Ensure fmar[3] doesn't exceed omar[3] - 0.1, which would make + # noma[3] negative and get clamped to 0, creating excess top space. + if (fmar[3] + 0.1 > omar[3]) fmar[3] = omar[3] - 0.1 if (par("las") %in% 1:2) { # extra whitespace bump on the y axis ## overrides for ridge and some types that use integer spacing with (named) axis labels ## FXIME From e3426240037d48b0d8bef0f3d6934ffeb19cb2ee Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Fri, 15 May 2026 12:23:15 -0700 Subject: [PATCH 2/5] fix double-scaling in strip margins --- R/facet.R | 10 +- R/tinyplot.R | 2 +- .../_tinysnapshot/facet_free_yscale.svg | 182 +- .../facet_interaction_newline.svg | 292 +- .../ridge_gradient_facet_theme_ridge.svg | 4166 ++++++++--------- .../ridge_gradient_facet_theme_ridge2.svg | 4150 ++++++++-------- .../tinytheme_dynamic_clean_facet.svg | 530 +-- .../tinytheme_dynamic_dark_facet.svg | 312 +- 8 files changed, 4823 insertions(+), 4821 deletions(-) diff --git a/R/facet.R b/R/facet.R index 5b8ae963..8bc3c604 100644 --- a/R/facet.R +++ b/R/facet.R @@ -106,14 +106,16 @@ draw_facet_window = function( ooma = par("oma") - # Bump top margin down for facet titles - fmar[3] = fmar[3] + facet_text / cex_fct_adj + # Bump top margin for facet strip. Use facet_text (not / cex_fct_adj) + # because nmar = (fmar + 0.1) / cex_fct_adj already divides — using + # facet_text directly keeps the inter-panel gap constant as newlines grow. + fmar[3] = fmar[3] + facet_text if (isTRUE(attr(facet, "facet_grid"))) { - fmar[3] = max(0, fmar[3] - facet_text / cex_fct_adj) + fmar[3] = max(0, fmar[3] - facet_text) # Indent for RHS facet_grid title strip if "right!" legend if (has_legend && ooma[4] > 0) ooma[4] = ooma[4] + 1 } - fmar[3] = fmar[3] + facet_newlines * facet_text / cex_fct_adj + fmar[3] = fmar[3] + facet_newlines * facet_text omar = par("mar") diff --git a/R/tinyplot.R b/R/tinyplot.R index f21f6356..f27cf80f 100644 --- a/R/tinyplot.R +++ b/R/tinyplot.R @@ -1174,7 +1174,7 @@ tinyplot.default = function( # if (length(facet_newlines)==0) facet_newlines = 0 # omar[3] = omar[3] + max(facet_newlines) facet_newlines = ifelse(length(facet_newlines) == 0, 0, max(facet_newlines)) - omar[3] = omar[3] + facet_newlines * facet_text / cex_fct_adj + omar[3] = omar[3] + facet_newlines * facet_text # apply the changes par(mar = omar) } diff --git a/inst/tinytest/_tinysnapshot/facet_free_yscale.svg b/inst/tinytest/_tinysnapshot/facet_free_yscale.svg index b5aab313..314618df 100644 --- a/inst/tinytest/_tinysnapshot/facet_free_yscale.svg +++ b/inst/tinytest/_tinysnapshot/facet_free_yscale.svg @@ -31,11 +31,11 @@ y - - + + - + @@ -51,43 +51,43 @@ 6 8 10 - - - - - - - -0 -2 -4 -6 -8 -10 - -A - + + + + + + + +0 +2 +4 +6 +8 +10 + +A + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - + @@ -103,69 +103,69 @@ 6 8 10 - - - - - - - -1000000 -1000002 -1000004 -1000006 -1000008 -1000010 - -B - + + + + + + + +1000000 +1000002 +1000004 +1000006 +1000008 +1000010 + +B + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg b/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg index 2f0c3358..976dfbb4 100644 --- a/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg +++ b/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg @@ -31,11 +31,11 @@ mpg - - + + - + @@ -47,28 +47,28 @@ 3 4 5 - - - - - - -10 -15 -20 -25 -30 - -4 -0 - + + + + + + +10 +15 +20 +25 +30 + +4 +0 + - - + + - + @@ -80,28 +80,28 @@ 3 4 5 - - - - - - -10 -15 -20 -25 -30 - -6 -0 - + + + + + + +10 +15 +20 +25 +30 + +6 +0 + - - + + - + @@ -113,28 +113,28 @@ 3 4 5 - - - - - - -10 -15 -20 -25 -30 - -8 -0 - + + + + + + +10 +15 +20 +25 +30 + +8 +0 + - - + + - + @@ -146,28 +146,28 @@ 3 4 5 - - - - - - -10 -15 -20 -25 -30 - -4 -1 - + + + + + + +10 +15 +20 +25 +30 + +4 +1 + - - + + - + @@ -179,28 +179,28 @@ 3 4 5 - - - - - - -10 -15 -20 -25 -30 - -6 -1 - + + + + + + +10 +15 +20 +25 +30 + +6 +1 + - - + + - + @@ -212,65 +212,65 @@ 3 4 5 - - - - - - -10 -15 -20 -25 -30 - -8 -1 - + + + + + + +10 +15 +20 +25 +30 + +8 +1 + - - - - + + + + - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - + + + diff --git a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg index 1b1ebf32..f1974287 100644 --- a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg +++ b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg @@ -30,11 +30,11 @@ am - - + + - + @@ -54,16 +54,16 @@ 30 35 40 - -0 - + +0 + - - + + - + @@ -83,2090 +83,2090 @@ 30 35 40 - -1 - + +1 + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - -0 -1 + + + +0 +1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - -0 -1 + + + +0 +1 - - + + - + diff --git a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg index f3ebe371..9223f63c 100644 --- a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg +++ b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg @@ -30,11 +30,11 @@ am - - + + - + 5 @@ -45,15 +45,15 @@ 30 35 40 - -0 + +0 - - + + - + 5 @@ -64,1042 +64,1042 @@ 30 35 40 - -1 + +1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0 -1 +0 +1 @@ -1110,1039 +1110,1039 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0 -1 +0 +1 @@ -2154,11 +2154,11 @@ - - + + - + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg index 597fadf2..f94db9e7 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg @@ -49,207 +49,207 @@ I(mpg * 1000) - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -0 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + +0 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -1 - -4 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + +1 + +4 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -6 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + +6 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + @@ -265,38 +265,38 @@ 20000 25000 30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - + + + + + + +10000 +15000 +20000 +25000 +30000 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + @@ -312,84 +312,84 @@ 20000 25000 30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -8 - + + + + + + +10000 +15000 +20000 +25000 +30000 + +8 + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg index 7f78a655..802469b3 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg @@ -49,117 +49,117 @@ I(mpg * 1000) - - + + - + -10000 -15000 -20000 -25000 -30000 - -0 +10000 +15000 +20000 +25000 +30000 + +0 - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - -1 - -4 + +1 + +4 - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + -10000 -15000 -20000 -25000 -30000 +10000 +15000 +20000 +25000 +30000 - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - -6 + +6 - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + 5000 @@ -168,31 +168,31 @@ 20000 25000 30000 -10000 -15000 -20000 -25000 -30000 +10000 +15000 +20000 +25000 +30000 - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + 5000 @@ -201,72 +201,72 @@ 20000 25000 30000 - -8 + +8 - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - + + - + From 5d90cb65f36764b99d924a803249e43aad47f199 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Fri, 15 May 2026 14:20:25 -0700 Subject: [PATCH 3/5] facets: center strip text vertically within rect - issue #585 --- R/facet.R | 36 +++++++++---------- .../_tinysnapshot/barplot_aggregation.svg | 4 +-- inst/tinytest/_tinysnapshot/barplot_facet.svg | 4 +-- .../_tinysnapshot/barplot_facet_free.svg | 4 +-- .../_tinysnapshot/barplot_flip_fancy.svg | 8 ++--- .../_tinysnapshot/boxplot_facet_by.svg | 8 ++--- .../_tinysnapshot/boxplot_facet_by_x_same.svg | 6 ++-- .../boxplot_groups_facets_with_missings.svg | 4 +-- inst/tinytest/_tinysnapshot/facet.svg | 6 ++-- inst/tinytest/_tinysnapshot/facet_1x2.svg | 4 +-- .../_tinysnapshot/facet_1x2_formula.svg | 4 +-- inst/tinytest/_tinysnapshot/facet_2x1.svg | 4 +-- .../_tinysnapshot/facet_2x1_formula.svg | 4 +-- inst/tinytest/_tinysnapshot/facet_2x2.svg | 8 ++--- .../_tinysnapshot/facet_2x2_formula.svg | 8 ++--- .../_tinysnapshot/facet_args_ncol.svg | 12 +++---- inst/tinytest/_tinysnapshot/facet_by.svg | 6 ++-- .../tinytest/_tinysnapshot/facet_by_equal.svg | 6 ++-- inst/tinytest/_tinysnapshot/facet_density.svg | 6 ++-- .../_tinysnapshot/facet_density_3x2.svg | 10 +++--- .../_tinysnapshot/facet_density_by.svg | 6 ++-- .../_tinysnapshot/facet_density_by_equal.svg | 6 ++-- .../_tinysnapshot/facet_density_fancy.svg | 6 ++-- .../facet_density_fancy_formula.svg | 6 ++-- .../_tinysnapshot/facet_density_formula.svg | 8 ++--- .../_tinysnapshot/facet_density_grid.svg | 8 ++--- inst/tinytest/_tinysnapshot/facet_fancy.svg | 6 ++-- .../_tinysnapshot/facet_fmar_args.svg | 12 +++---- .../_tinysnapshot/facet_fmar_par2.svg | 12 +++---- inst/tinytest/_tinysnapshot/facet_formula.svg | 6 ++-- inst/tinytest/_tinysnapshot/facet_free.svg | 8 ++--- .../_tinysnapshot/facet_free_grid.svg | 8 ++--- .../_tinysnapshot/facet_free_yscale.svg | 4 +-- inst/tinytest/_tinysnapshot/facet_grid.svg | 10 +++--- .../_tinysnapshot/facet_grid_fancy.svg | 10 +++--- .../tinytest/_tinysnapshot/facet_grid_log.svg | 10 +++--- .../_tinysnapshot/facet_grid_multivar.svg | 14 ++++---- .../tinytest/_tinysnapshot/facet_hist_3x2.svg | 10 +++--- .../_tinysnapshot/facet_interaction.svg | 12 +++---- .../facet_interaction_newline.svg | 24 ++++++------- inst/tinytest/_tinysnapshot/facet_ribbon.svg | 6 ++-- .../_tinysnapshot/facet_ribbon_add.svg | 6 ++-- .../_tinysnapshot/facet_ribbon_by.svg | 6 ++-- .../_tinysnapshot/facet_ribbon_by_equal.svg | 6 ++-- .../_tinysnapshot/facet_ribbon_fancy_add.svg | 6 ++-- inst/tinytest/_tinysnapshot/flip_facet_by.svg | 6 ++-- .../_tinysnapshot/grid_func_facet.svg | 6 ++-- inst/tinytest/_tinysnapshot/hist_byfacet.svg | 6 ++-- .../_tinysnapshot/hist_facet_free.svg | 6 ++-- .../hist_facet_free_breaks_free.svg | 6 ++-- inst/tinytest/_tinysnapshot/hist_faceted.svg | 6 ++-- .../_tinysnapshot/hist_grouped_faceted.svg | 4 +-- inst/tinytest/_tinysnapshot/hline.svg | 6 ++-- .../_tinysnapshot/hline_recyle_facet.svg | 6 ++-- .../hline_recyle_facet_bycont.svg | 6 ++-- .../_tinysnapshot/model_glm_facet.svg | 10 +++--- .../tinytest/_tinysnapshot/model_lm_facet.svg | 10 +++--- .../_tinysnapshot/model_loess_facet.svg | 10 +++--- .../_tinysnapshot/model_spline_facet.svg | 10 +++--- .../_tinysnapshot/ridge_gradient_facet.svg | 4 +-- .../ridge_gradient_facet_raster_alpha.svg | 4 +-- .../ridge_gradient_facet_theme_ridge.svg | 4 +-- .../ridge_gradient_facet_theme_ridge2.svg | 4 +-- .../_tinysnapshot/spineplot_facet.svg | 8 ++--- .../_tinysnapshot/spineplot_facet_by.svg | 8 ++--- .../spineplot_facet_by_fancy.svg | 8 ++--- .../_tinysnapshot/summary_complex.svg | 8 ++--- inst/tinytest/_tinysnapshot/text_facets.svg | 4 +-- inst/tinytest/_tinysnapshot/tinyplot_add.svg | 6 ++-- .../tinyplot_add_no_recursive_margins.svg | 6 ++-- .../tinytheme_dynamic_clean_facet.svg | 10 +++--- .../tinytheme_dynamic_dark_facet.svg | 10 +++--- .../_tinysnapshot/violin_facet_by.svg | 8 ++--- .../_tinysnapshot/violin_facet_x_by_same.svg | 6 ++-- inst/tinytest/_tinysnapshot/vline_vector.svg | 6 ++-- 75 files changed, 285 insertions(+), 285 deletions(-) diff --git a/R/facet.R b/R/facet.R index 8bc3c604..e578f359 100644 --- a/R/facet.R +++ b/R/facet.R @@ -409,13 +409,13 @@ draw_facet_window = function( if (isTRUE(attr(facet, "facet_grid"))) { ## top facet strips if (ii %in% 1:nfacet_cols) { + line_height_lines = (facet_title_lines + .1) * facet_text / cex_fct_adj if (isTRUE(facet_rect)) { - line_height = (facet_title_lines + .1) * facet_text / cex_fct_adj if (ylog) { - line_height = grconvertY(line_height, from = "lines", to = "user") / grconvertY(0, from = "lines", to = "user") + line_height = grconvertY(line_height_lines, from = "lines", to = "user") / grconvertY(0, from = "lines", to = "user") rect_height = corners[4] * line_height } else { - line_height = grconvertY(line_height, from = "lines", to = "user") - grconvertY(0, from = "lines", to = "user") + line_height = grconvertY(line_height_lines, from = "lines", to = "user") - grconvertY(0, from = "lines", to = "user") rect_height = corners[4] + line_height } rect( @@ -426,17 +426,17 @@ draw_facet_window = function( } xpos = if (xlog) 10^(mean(log10(corners[1:2]))) else mean(corners[1:2]) if (ylog) { - ypos = grconvertY(0.4, from = "lines", to = "user") / grconvertY(0, from = "lines", to = "user") + ypos = grconvertY(line_height_lines / 2, from = "lines", to = "user") / grconvertY(0, from = "lines", to = "user") ypos = corners[4] * ypos } else { - ypos = grconvertY(0.4, from = "lines", to = "user") - grconvertY(0, from = "lines", to = "user") + ypos = grconvertY(line_height_lines / 2, from = "lines", to = "user") - grconvertY(0, from = "lines", to = "user") ypos = corners[4] + ypos } text( x = xpos, y = ypos, labels = sub("^(.*?)~.*", "\\1", facets[[ii]]), - adj = c(0.5, 0), + adj = c(0.5, 0.5), cex = facet_text / cex_fct_adj, col = facet_col, font = facet_font, @@ -445,13 +445,13 @@ draw_facet_window = function( } ## right facet strips if (ii %% nfacet_cols == 0 || ii == nfacets) { + line_height_lines = (facet_title_lines + .1) * facet_text / cex_fct_adj if (isTRUE(facet_rect)) { - line_height = (facet_title_lines + .1) * facet_text / cex_fct_adj if (xlog) { - line_height = grconvertX(line_height, from = "lines", to = "user") / grconvertX(0, from = "lines", to = "user") + line_height = grconvertX(line_height_lines, from = "lines", to = "user") / grconvertX(0, from = "lines", to = "user") rect_width = corners[2] * line_height } else { - line_height = grconvertX(line_height, from = "lines", to = "user") - grconvertX(0, from = "lines", to = "user") + line_height = grconvertX(line_height_lines, from = "lines", to = "user") - grconvertX(0, from = "lines", to = "user") rect_width = corners[2] + line_height } rect( @@ -461,10 +461,10 @@ draw_facet_window = function( ) } if (xlog) { - xpos = grconvertX(0.4, from = "lines", to = "user") / grconvertX(0, from = "lines", to = "user") + xpos = grconvertX(line_height_lines / 2, from = "lines", to = "user") / grconvertX(0, from = "lines", to = "user") xpos = corners[2] * xpos } else { - xpos = grconvertX(0.4, from = "lines", to = "user") - grconvertX(0, from = "lines", to = "user") + xpos = grconvertX(line_height_lines / 2, from = "lines", to = "user") - grconvertX(0, from = "lines", to = "user") xpos = corners[2] + xpos } ypos = if (ylog) 10^(mean(log10(corners[3:4]))) else mean(corners[3:4]) @@ -473,7 +473,7 @@ draw_facet_window = function( y = ypos, labels = sub("^.*?~(.*)", "\\1", facets[[ii]]), srt = 270, - adj = c(0.5, 0), + adj = c(0.5, 0.5), cex = facet_text / cex_fct_adj, col = facet_col, font = facet_font, @@ -481,13 +481,13 @@ draw_facet_window = function( ) } } else { + line_height_lines = (facet_title_lines + .1) * facet_text / cex_fct_adj if (isTRUE(facet_rect)) { - line_height = (facet_title_lines + .1) * facet_text / cex_fct_adj if (ylog) { - line_height = grconvertY(line_height, from = "lines", to = "user") / grconvertY(0, from = "lines", to = "user") + line_height = grconvertY(line_height_lines, from = "lines", to = "user") / grconvertY(0, from = "lines", to = "user") rect_height = corners[4] * line_height } else { - line_height = grconvertY(line_height, from = "lines", to = "user") - grconvertY(0, from = "lines", to = "user") + line_height = grconvertY(line_height_lines, from = "lines", to = "user") - grconvertY(0, from = "lines", to = "user") rect_height = corners[4] + line_height } rect( @@ -498,17 +498,17 @@ draw_facet_window = function( } xpos = if (xlog) 10^(mean(log10(corners[1:2]))) else mean(corners[1:2]) if (ylog) { - ypos = grconvertY(0.4, from = "lines", to = "user") / grconvertY(0, from = "lines", to = "user") + ypos = grconvertY(line_height_lines / 2, from = "lines", to = "user") / grconvertY(0, from = "lines", to = "user") ypos = corners[4] * ypos } else { - ypos = grconvertY(0.4, from = "lines", to = "user") - grconvertY(0, from = "lines", to = "user") + ypos = grconvertY(line_height_lines / 2, from = "lines", to = "user") - grconvertY(0, from = "lines", to = "user") ypos = corners[4] + ypos } text( x = xpos, y = ypos, labels = paste(facets[[ii]]), - adj = c(0.5, 0), + adj = c(0.5, 0.5), cex = facet_text / cex_fct_adj, col = facet_col, font = facet_font, diff --git a/inst/tinytest/_tinysnapshot/barplot_aggregation.svg b/inst/tinytest/_tinysnapshot/barplot_aggregation.svg index 5c22f5d4..11103164 100644 --- a/inst/tinytest/_tinysnapshot/barplot_aggregation.svg +++ b/inst/tinytest/_tinysnapshot/barplot_aggregation.svg @@ -74,7 +74,7 @@ 4 5 -1 +1 @@ -94,7 +94,7 @@ 8 9 -2 +2 diff --git a/inst/tinytest/_tinysnapshot/barplot_facet.svg b/inst/tinytest/_tinysnapshot/barplot_facet.svg index 2357261e..ee5ee91a 100644 --- a/inst/tinytest/_tinysnapshot/barplot_facet.svg +++ b/inst/tinytest/_tinysnapshot/barplot_facet.svg @@ -70,7 +70,7 @@ 12 14 -0 +0 @@ -84,7 +84,7 @@ 6 8 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/barplot_facet_free.svg b/inst/tinytest/_tinysnapshot/barplot_facet_free.svg index e2fb58af..7477260b 100644 --- a/inst/tinytest/_tinysnapshot/barplot_facet_free.svg +++ b/inst/tinytest/_tinysnapshot/barplot_facet_free.svg @@ -70,7 +70,7 @@ 12 14 -0 +0 @@ -97,7 +97,7 @@ 8 10 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/barplot_flip_fancy.svg b/inst/tinytest/_tinysnapshot/barplot_flip_fancy.svg index bf7ba34b..94cadd07 100644 --- a/inst/tinytest/_tinysnapshot/barplot_flip_fancy.svg +++ b/inst/tinytest/_tinysnapshot/barplot_flip_fancy.svg @@ -52,7 +52,7 @@ Male Female -1st +1st @@ -63,7 +63,7 @@ -2nd +2nd @@ -91,7 +91,7 @@ Male Female -3rd +3rd @@ -117,7 +117,7 @@ 250 300 -Crew +Crew diff --git a/inst/tinytest/_tinysnapshot/boxplot_facet_by.svg b/inst/tinytest/_tinysnapshot/boxplot_facet_by.svg index 22c28214..d7ab71de 100644 --- a/inst/tinytest/_tinysnapshot/boxplot_facet_by.svg +++ b/inst/tinytest/_tinysnapshot/boxplot_facet_by.svg @@ -87,7 +87,7 @@ 200 300 -1 +1 @@ -132,7 +132,7 @@ 200 300 -2 +2 @@ -177,7 +177,7 @@ 200 300 -3 +3 @@ -222,7 +222,7 @@ 200 300 -4 +4 diff --git a/inst/tinytest/_tinysnapshot/boxplot_facet_by_x_same.svg b/inst/tinytest/_tinysnapshot/boxplot_facet_by_x_same.svg index d77971e6..b1254752 100644 --- a/inst/tinytest/_tinysnapshot/boxplot_facet_by_x_same.svg +++ b/inst/tinytest/_tinysnapshot/boxplot_facet_by_x_same.svg @@ -70,7 +70,7 @@ 25 30 -3 +3 @@ -100,7 +100,7 @@ 25 30 -4 +4 @@ -130,7 +130,7 @@ 25 30 -5 +5 diff --git a/inst/tinytest/_tinysnapshot/boxplot_groups_facets_with_missings.svg b/inst/tinytest/_tinysnapshot/boxplot_groups_facets_with_missings.svg index c1935416..ee62bf0a 100644 --- a/inst/tinytest/_tinysnapshot/boxplot_groups_facets_with_missings.svg +++ b/inst/tinytest/_tinysnapshot/boxplot_groups_facets_with_missings.svg @@ -70,7 +70,7 @@ 25 30 -0 +0 @@ -100,7 +100,7 @@ 25 30 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/facet.svg b/inst/tinytest/_tinysnapshot/facet.svg index 0da55c42..f5e34a65 100644 --- a/inst/tinytest/_tinysnapshot/facet.svg +++ b/inst/tinytest/_tinysnapshot/facet.svg @@ -58,7 +58,7 @@ 25 30 -4 +4 @@ -90,7 +90,7 @@ 25 30 -6 +6 @@ -122,7 +122,7 @@ 25 30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_1x2.svg b/inst/tinytest/_tinysnapshot/facet_1x2.svg index 7f7afe28..172cb61e 100644 --- a/inst/tinytest/_tinysnapshot/facet_1x2.svg +++ b/inst/tinytest/_tinysnapshot/facet_1x2.svg @@ -58,7 +58,7 @@ 25 30 -0 +0 @@ -90,7 +90,7 @@ 25 30 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/facet_1x2_formula.svg b/inst/tinytest/_tinysnapshot/facet_1x2_formula.svg index 7f7afe28..172cb61e 100644 --- a/inst/tinytest/_tinysnapshot/facet_1x2_formula.svg +++ b/inst/tinytest/_tinysnapshot/facet_1x2_formula.svg @@ -58,7 +58,7 @@ 25 30 -0 +0 @@ -90,7 +90,7 @@ 25 30 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/facet_2x1.svg b/inst/tinytest/_tinysnapshot/facet_2x1.svg index 032144a0..1c60ae06 100644 --- a/inst/tinytest/_tinysnapshot/facet_2x1.svg +++ b/inst/tinytest/_tinysnapshot/facet_2x1.svg @@ -58,7 +58,7 @@ 25 30 -0 +0 @@ -90,7 +90,7 @@ 25 30 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/facet_2x1_formula.svg b/inst/tinytest/_tinysnapshot/facet_2x1_formula.svg index 032144a0..1c60ae06 100644 --- a/inst/tinytest/_tinysnapshot/facet_2x1_formula.svg +++ b/inst/tinytest/_tinysnapshot/facet_2x1_formula.svg @@ -58,7 +58,7 @@ 25 30 -0 +0 @@ -90,7 +90,7 @@ 25 30 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/facet_2x2.svg b/inst/tinytest/_tinysnapshot/facet_2x2.svg index 437e51bb..c54ad696 100644 --- a/inst/tinytest/_tinysnapshot/facet_2x2.svg +++ b/inst/tinytest/_tinysnapshot/facet_2x2.svg @@ -58,7 +58,7 @@ 25 30 -0.0 +0.0 @@ -90,7 +90,7 @@ 25 30 -1.0 +1.0 @@ -122,7 +122,7 @@ 25 30 -0.1 +0.1 @@ -154,7 +154,7 @@ 25 30 -1.1 +1.1 diff --git a/inst/tinytest/_tinysnapshot/facet_2x2_formula.svg b/inst/tinytest/_tinysnapshot/facet_2x2_formula.svg index ce662a81..749e906c 100644 --- a/inst/tinytest/_tinysnapshot/facet_2x2_formula.svg +++ b/inst/tinytest/_tinysnapshot/facet_2x2_formula.svg @@ -58,7 +58,7 @@ 25 30 -0:0 +0:0 @@ -90,7 +90,7 @@ 25 30 -1:0 +1:0 @@ -122,7 +122,7 @@ 25 30 -0:1 +0:1 @@ -154,7 +154,7 @@ 25 30 -1:1 +1:1 diff --git a/inst/tinytest/_tinysnapshot/facet_args_ncol.svg b/inst/tinytest/_tinysnapshot/facet_args_ncol.svg index d30daf87..a5a479a7 100644 --- a/inst/tinytest/_tinysnapshot/facet_args_ncol.svg +++ b/inst/tinytest/_tinysnapshot/facet_args_ncol.svg @@ -59,7 +59,7 @@ 25 30 -4.0 +4.0 @@ -91,7 +91,7 @@ 25 30 -6.0 +6.0 @@ -123,7 +123,7 @@ 25 30 -8.0 +8.0 @@ -155,7 +155,7 @@ 25 30 -4.1 +4.1 @@ -187,7 +187,7 @@ 25 30 -6.1 +6.1 @@ -219,7 +219,7 @@ 25 30 -8.1 +8.1 diff --git a/inst/tinytest/_tinysnapshot/facet_by.svg b/inst/tinytest/_tinysnapshot/facet_by.svg index 7f346831..c578c397 100644 --- a/inst/tinytest/_tinysnapshot/facet_by.svg +++ b/inst/tinytest/_tinysnapshot/facet_by.svg @@ -70,7 +70,7 @@ 25 30 -4 +4 @@ -102,7 +102,7 @@ 25 30 -6 +6 @@ -134,7 +134,7 @@ 25 30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_by_equal.svg b/inst/tinytest/_tinysnapshot/facet_by_equal.svg index 975debb9..d9ebc336 100644 --- a/inst/tinytest/_tinysnapshot/facet_by_equal.svg +++ b/inst/tinytest/_tinysnapshot/facet_by_equal.svg @@ -72,7 +72,7 @@ 25 30 -4 +4 @@ -104,7 +104,7 @@ 25 30 -6 +6 @@ -136,7 +136,7 @@ 25 30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_density.svg b/inst/tinytest/_tinysnapshot/facet_density.svg index 71681932..3b37b2ad 100644 --- a/inst/tinytest/_tinysnapshot/facet_density.svg +++ b/inst/tinytest/_tinysnapshot/facet_density.svg @@ -62,7 +62,7 @@ 0.10 0.15 -4 +4 @@ -98,7 +98,7 @@ 0.10 0.15 -6 +6 @@ -134,7 +134,7 @@ 0.10 0.15 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_density_3x2.svg b/inst/tinytest/_tinysnapshot/facet_density_3x2.svg index f5a62c2f..94109daf 100644 --- a/inst/tinytest/_tinysnapshot/facet_density_3x2.svg +++ b/inst/tinytest/_tinysnapshot/facet_density_3x2.svg @@ -60,7 +60,7 @@ 1.0 1.5 -0 +0 @@ -94,9 +94,9 @@ 1.0 1.5 -1 +1 -4 +4 @@ -162,7 +162,7 @@ 1.0 1.5 -6 +6 @@ -228,7 +228,7 @@ 1.0 1.5 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_density_by.svg b/inst/tinytest/_tinysnapshot/facet_density_by.svg index de0e2cbf..75d82612 100644 --- a/inst/tinytest/_tinysnapshot/facet_density_by.svg +++ b/inst/tinytest/_tinysnapshot/facet_density_by.svg @@ -78,7 +78,7 @@ 0.25 0.30 -4 +4 @@ -118,7 +118,7 @@ 0.25 0.30 -6 +6 @@ -158,7 +158,7 @@ 0.25 0.30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_density_by_equal.svg b/inst/tinytest/_tinysnapshot/facet_density_by_equal.svg index 07130b1e..06937b86 100644 --- a/inst/tinytest/_tinysnapshot/facet_density_by_equal.svg +++ b/inst/tinytest/_tinysnapshot/facet_density_by_equal.svg @@ -76,7 +76,7 @@ 0.10 0.15 -4 +4 @@ -112,7 +112,7 @@ 0.10 0.15 -6 +6 @@ -148,7 +148,7 @@ 0.10 0.15 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_density_fancy.svg b/inst/tinytest/_tinysnapshot/facet_density_fancy.svg index 8214a4ef..cac07835 100644 --- a/inst/tinytest/_tinysnapshot/facet_density_fancy.svg +++ b/inst/tinytest/_tinysnapshot/facet_density_fancy.svg @@ -80,7 +80,7 @@ 0.25 0.30 -4 +4 @@ -119,7 +119,7 @@ 30 35 -6 +6 @@ -158,7 +158,7 @@ 30 35 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_density_fancy_formula.svg b/inst/tinytest/_tinysnapshot/facet_density_fancy_formula.svg index 1abb2be0..02e7eb6d 100644 --- a/inst/tinytest/_tinysnapshot/facet_density_fancy_formula.svg +++ b/inst/tinytest/_tinysnapshot/facet_density_fancy_formula.svg @@ -80,7 +80,7 @@ 0.25 0.30 -4 +4 @@ -119,7 +119,7 @@ 30 35 -6 +6 @@ -158,7 +158,7 @@ 30 35 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_density_formula.svg b/inst/tinytest/_tinysnapshot/facet_density_formula.svg index 3fcde12a..bdf3c5ab 100644 --- a/inst/tinytest/_tinysnapshot/facet_density_formula.svg +++ b/inst/tinytest/_tinysnapshot/facet_density_formula.svg @@ -59,7 +59,7 @@ 0.02 0.03 -cold:calm +cold:calm @@ -91,7 +91,7 @@ 0.02 0.03 -hot:calm +hot:calm @@ -123,7 +123,7 @@ 0.02 0.03 -cold:windy +cold:windy @@ -155,7 +155,7 @@ 0.02 0.03 -hot:windy +hot:windy diff --git a/inst/tinytest/_tinysnapshot/facet_density_grid.svg b/inst/tinytest/_tinysnapshot/facet_density_grid.svg index 941f6fd3..d489f6b0 100644 --- a/inst/tinytest/_tinysnapshot/facet_density_grid.svg +++ b/inst/tinytest/_tinysnapshot/facet_density_grid.svg @@ -59,7 +59,7 @@ 0.02 0.03 -cold +cold @@ -91,9 +91,9 @@ 0.02 0.03 -hot +hot -calm +calm @@ -155,7 +155,7 @@ 0.02 0.03 -windy +windy diff --git a/inst/tinytest/_tinysnapshot/facet_fancy.svg b/inst/tinytest/_tinysnapshot/facet_fancy.svg index 589f3501..b92c2fb3 100644 --- a/inst/tinytest/_tinysnapshot/facet_fancy.svg +++ b/inst/tinytest/_tinysnapshot/facet_fancy.svg @@ -72,7 +72,7 @@ 25 30 -4 +4 @@ -103,7 +103,7 @@ 4 5 -6 +6 @@ -134,7 +134,7 @@ 4 5 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_fmar_args.svg b/inst/tinytest/_tinysnapshot/facet_fmar_args.svg index 7e354d4d..d72358b4 100644 --- a/inst/tinytest/_tinysnapshot/facet_fmar_args.svg +++ b/inst/tinytest/_tinysnapshot/facet_fmar_args.svg @@ -58,7 +58,7 @@ 25 30 -4.0 +4.0 @@ -90,7 +90,7 @@ 25 30 -6.0 +6.0 @@ -122,7 +122,7 @@ 25 30 -8.0 +8.0 @@ -154,7 +154,7 @@ 25 30 -4.1 +4.1 @@ -186,7 +186,7 @@ 25 30 -6.1 +6.1 @@ -218,7 +218,7 @@ 25 30 -8.1 +8.1 diff --git a/inst/tinytest/_tinysnapshot/facet_fmar_par2.svg b/inst/tinytest/_tinysnapshot/facet_fmar_par2.svg index 7e354d4d..d72358b4 100644 --- a/inst/tinytest/_tinysnapshot/facet_fmar_par2.svg +++ b/inst/tinytest/_tinysnapshot/facet_fmar_par2.svg @@ -58,7 +58,7 @@ 25 30 -4.0 +4.0 @@ -90,7 +90,7 @@ 25 30 -6.0 +6.0 @@ -122,7 +122,7 @@ 25 30 -8.0 +8.0 @@ -154,7 +154,7 @@ 25 30 -4.1 +4.1 @@ -186,7 +186,7 @@ 25 30 -6.1 +6.1 @@ -218,7 +218,7 @@ 25 30 -8.1 +8.1 diff --git a/inst/tinytest/_tinysnapshot/facet_formula.svg b/inst/tinytest/_tinysnapshot/facet_formula.svg index 0da55c42..f5e34a65 100644 --- a/inst/tinytest/_tinysnapshot/facet_formula.svg +++ b/inst/tinytest/_tinysnapshot/facet_formula.svg @@ -58,7 +58,7 @@ 25 30 -4 +4 @@ -90,7 +90,7 @@ 25 30 -6 +6 @@ -122,7 +122,7 @@ 25 30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_free.svg b/inst/tinytest/_tinysnapshot/facet_free.svg index 41bf573e..9ff9e609 100644 --- a/inst/tinytest/_tinysnapshot/facet_free.svg +++ b/inst/tinytest/_tinysnapshot/facet_free.svg @@ -63,7 +63,7 @@ 200 300 -cold:calm +cold:calm @@ -95,7 +95,7 @@ 250 300 -hot:calm +hot:calm @@ -135,7 +135,7 @@ 250 300 -cold:windy +cold:windy @@ -169,7 +169,7 @@ 200 250 -hot:windy +hot:windy diff --git a/inst/tinytest/_tinysnapshot/facet_free_grid.svg b/inst/tinytest/_tinysnapshot/facet_free_grid.svg index 7b4592e4..dd22b6ec 100644 --- a/inst/tinytest/_tinysnapshot/facet_free_grid.svg +++ b/inst/tinytest/_tinysnapshot/facet_free_grid.svg @@ -63,7 +63,7 @@ 200 300 -cold +cold @@ -95,9 +95,9 @@ 250 300 -hot +hot -calm +calm @@ -169,7 +169,7 @@ 200 250 -windy +windy diff --git a/inst/tinytest/_tinysnapshot/facet_free_yscale.svg b/inst/tinytest/_tinysnapshot/facet_free_yscale.svg index 314618df..fc8bf35e 100644 --- a/inst/tinytest/_tinysnapshot/facet_free_yscale.svg +++ b/inst/tinytest/_tinysnapshot/facet_free_yscale.svg @@ -65,7 +65,7 @@ 8 10 -A +A @@ -117,7 +117,7 @@ 1000008 1000010 -B +B diff --git a/inst/tinytest/_tinysnapshot/facet_grid.svg b/inst/tinytest/_tinysnapshot/facet_grid.svg index e303c828..4db13802 100644 --- a/inst/tinytest/_tinysnapshot/facet_grid.svg +++ b/inst/tinytest/_tinysnapshot/facet_grid.svg @@ -60,7 +60,7 @@ 25 30 -4 +4 @@ -92,7 +92,7 @@ 25 30 -6 +6 @@ -124,9 +124,9 @@ 25 30 -8 +8 -0 +0 @@ -218,7 +218,7 @@ 25 30 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/facet_grid_fancy.svg b/inst/tinytest/_tinysnapshot/facet_grid_fancy.svg index a1335021..24d56b14 100644 --- a/inst/tinytest/_tinysnapshot/facet_grid_fancy.svg +++ b/inst/tinytest/_tinysnapshot/facet_grid_fancy.svg @@ -67,7 +67,7 @@ 30 35 -4 +4 @@ -92,7 +92,7 @@ -6 +6 @@ -117,9 +117,9 @@ -8 +8 -0 +0 @@ -242,7 +242,7 @@ 5 6 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/facet_grid_log.svg b/inst/tinytest/_tinysnapshot/facet_grid_log.svg index 6d0371ea..0199a588 100644 --- a/inst/tinytest/_tinysnapshot/facet_grid_log.svg +++ b/inst/tinytest/_tinysnapshot/facet_grid_log.svg @@ -62,7 +62,7 @@ 30 35 -4 +4 @@ -96,7 +96,7 @@ 30 35 -6 +6 @@ -130,9 +130,9 @@ 30 35 -8 +8 -0 +0 @@ -230,7 +230,7 @@ 30 35 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/facet_grid_multivar.svg b/inst/tinytest/_tinysnapshot/facet_grid_multivar.svg index 20445d17..eaee76a9 100644 --- a/inst/tinytest/_tinysnapshot/facet_grid_multivar.svg +++ b/inst/tinytest/_tinysnapshot/facet_grid_multivar.svg @@ -58,7 +58,7 @@ 20 30 -3 +3 @@ -88,7 +88,7 @@ 20 30 -4 +4 @@ -118,9 +118,9 @@ 20 30 -5 +5 -0:0 +0:0 @@ -206,7 +206,7 @@ 20 30 -1:0 +1:0 @@ -292,7 +292,7 @@ 20 30 -0:1 +0:1 @@ -378,7 +378,7 @@ 20 30 -1:1 +1:1 diff --git a/inst/tinytest/_tinysnapshot/facet_hist_3x2.svg b/inst/tinytest/_tinysnapshot/facet_hist_3x2.svg index 11b4ba4d..9c8098d4 100644 --- a/inst/tinytest/_tinysnapshot/facet_hist_3x2.svg +++ b/inst/tinytest/_tinysnapshot/facet_hist_3x2.svg @@ -62,7 +62,7 @@ 5 6 -0 +0 @@ -98,9 +98,9 @@ 5 6 -1 +1 -4 +4 @@ -170,7 +170,7 @@ 5 6 -6 +6 @@ -240,7 +240,7 @@ 5 6 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_interaction.svg b/inst/tinytest/_tinysnapshot/facet_interaction.svg index be6cb075..58187186 100644 --- a/inst/tinytest/_tinysnapshot/facet_interaction.svg +++ b/inst/tinytest/_tinysnapshot/facet_interaction.svg @@ -59,7 +59,7 @@ 25 30 -4.0 +4.0 @@ -91,7 +91,7 @@ 25 30 -6.0 +6.0 @@ -123,7 +123,7 @@ 25 30 -8.0 +8.0 @@ -155,7 +155,7 @@ 25 30 -4.1 +4.1 @@ -187,7 +187,7 @@ 25 30 -6.1 +6.1 @@ -219,7 +219,7 @@ 25 30 -8.1 +8.1 diff --git a/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg b/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg index 976dfbb4..17fa3850 100644 --- a/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg +++ b/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg @@ -59,8 +59,8 @@ 25 30 -4 -0 +4 +0 @@ -92,8 +92,8 @@ 25 30 -6 -0 +6 +0 @@ -125,8 +125,8 @@ 25 30 -8 -0 +8 +0 @@ -158,8 +158,8 @@ 25 30 -4 -1 +4 +1 @@ -191,8 +191,8 @@ 25 30 -6 -1 +6 +1 @@ -224,8 +224,8 @@ 25 30 -8 -1 +8 +1 diff --git a/inst/tinytest/_tinysnapshot/facet_ribbon.svg b/inst/tinytest/_tinysnapshot/facet_ribbon.svg index 8c2dc139..e81783fb 100644 --- a/inst/tinytest/_tinysnapshot/facet_ribbon.svg +++ b/inst/tinytest/_tinysnapshot/facet_ribbon.svg @@ -58,7 +58,7 @@ 25 30 -4 +4 @@ -90,7 +90,7 @@ 25 30 -6 +6 @@ -122,7 +122,7 @@ 25 30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_ribbon_add.svg b/inst/tinytest/_tinysnapshot/facet_ribbon_add.svg index d122c947..fe9897c1 100644 --- a/inst/tinytest/_tinysnapshot/facet_ribbon_add.svg +++ b/inst/tinytest/_tinysnapshot/facet_ribbon_add.svg @@ -58,7 +58,7 @@ 25 30 -4 +4 @@ -90,7 +90,7 @@ 25 30 -6 +6 @@ -122,7 +122,7 @@ 25 30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_ribbon_by.svg b/inst/tinytest/_tinysnapshot/facet_ribbon_by.svg index ee876ddb..4e7d64f4 100644 --- a/inst/tinytest/_tinysnapshot/facet_ribbon_by.svg +++ b/inst/tinytest/_tinysnapshot/facet_ribbon_by.svg @@ -74,7 +74,7 @@ 30 35 -4 +4 @@ -108,7 +108,7 @@ 30 35 -6 +6 @@ -142,7 +142,7 @@ 30 35 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_ribbon_by_equal.svg b/inst/tinytest/_tinysnapshot/facet_ribbon_by_equal.svg index 7d8dd7cf..30e81b46 100644 --- a/inst/tinytest/_tinysnapshot/facet_ribbon_by_equal.svg +++ b/inst/tinytest/_tinysnapshot/facet_ribbon_by_equal.svg @@ -75,7 +75,7 @@ 25 30 -4 +4 @@ -107,7 +107,7 @@ 25 30 -6 +6 @@ -139,7 +139,7 @@ 25 30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/facet_ribbon_fancy_add.svg b/inst/tinytest/_tinysnapshot/facet_ribbon_fancy_add.svg index ed19d8f4..69ccd90f 100644 --- a/inst/tinytest/_tinysnapshot/facet_ribbon_fancy_add.svg +++ b/inst/tinytest/_tinysnapshot/facet_ribbon_fancy_add.svg @@ -72,7 +72,7 @@ 25 30 -4 +4 @@ -115,7 +115,7 @@ 25 30 -6 +6 @@ -158,7 +158,7 @@ 25 30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/flip_facet_by.svg b/inst/tinytest/_tinysnapshot/flip_facet_by.svg index f4aedfed..fff3db5e 100644 --- a/inst/tinytest/_tinysnapshot/flip_facet_by.svg +++ b/inst/tinytest/_tinysnapshot/flip_facet_by.svg @@ -81,7 +81,7 @@ 6 7 -setosa +setosa @@ -138,7 +138,7 @@ 6 7 -versicolor +versicolor @@ -195,7 +195,7 @@ 6 7 -virginica +virginica diff --git a/inst/tinytest/_tinysnapshot/grid_func_facet.svg b/inst/tinytest/_tinysnapshot/grid_func_facet.svg index 5f654928..ecaf0d76 100644 --- a/inst/tinytest/_tinysnapshot/grid_func_facet.svg +++ b/inst/tinytest/_tinysnapshot/grid_func_facet.svg @@ -86,7 +86,7 @@ 7.5 8.0 -setosa +setosa @@ -147,7 +147,7 @@ 7.5 8.0 -versicolor +versicolor @@ -208,7 +208,7 @@ 7.5 8.0 -virginica +virginica diff --git a/inst/tinytest/_tinysnapshot/hist_byfacet.svg b/inst/tinytest/_tinysnapshot/hist_byfacet.svg index fd6d7491..c4793bc3 100644 --- a/inst/tinytest/_tinysnapshot/hist_byfacet.svg +++ b/inst/tinytest/_tinysnapshot/hist_byfacet.svg @@ -76,7 +76,7 @@ 20 30 -setosa +setosa @@ -112,7 +112,7 @@ 20 30 -versicolor +versicolor @@ -148,7 +148,7 @@ 20 30 -virginica +virginica diff --git a/inst/tinytest/_tinysnapshot/hist_facet_free.svg b/inst/tinytest/_tinysnapshot/hist_facet_free.svg index 5ef65214..75556111 100644 --- a/inst/tinytest/_tinysnapshot/hist_facet_free.svg +++ b/inst/tinytest/_tinysnapshot/hist_facet_free.svg @@ -70,7 +70,7 @@ 30 35 -setosa +setosa @@ -106,7 +106,7 @@ 15 20 -versicolor +versicolor @@ -146,7 +146,7 @@ 10 12 -virginica +virginica diff --git a/inst/tinytest/_tinysnapshot/hist_facet_free_breaks_free.svg b/inst/tinytest/_tinysnapshot/hist_facet_free_breaks_free.svg index 3fcb8544..6ca60a1d 100644 --- a/inst/tinytest/_tinysnapshot/hist_facet_free_breaks_free.svg +++ b/inst/tinytest/_tinysnapshot/hist_facet_free_breaks_free.svg @@ -68,7 +68,7 @@ 30 35 -setosa +setosa @@ -106,7 +106,7 @@ 10 12 -versicolor +versicolor @@ -148,7 +148,7 @@ 10 12 -virginica +virginica diff --git a/inst/tinytest/_tinysnapshot/hist_faceted.svg b/inst/tinytest/_tinysnapshot/hist_faceted.svg index 461c3115..62267397 100644 --- a/inst/tinytest/_tinysnapshot/hist_faceted.svg +++ b/inst/tinytest/_tinysnapshot/hist_faceted.svg @@ -62,7 +62,7 @@ 20 30 -setosa +setosa @@ -98,7 +98,7 @@ 20 30 -versicolor +versicolor @@ -134,7 +134,7 @@ 20 30 -virginica +virginica diff --git a/inst/tinytest/_tinysnapshot/hist_grouped_faceted.svg b/inst/tinytest/_tinysnapshot/hist_grouped_faceted.svg index 0ac56dba..3afc906c 100644 --- a/inst/tinytest/_tinysnapshot/hist_grouped_faceted.svg +++ b/inst/tinytest/_tinysnapshot/hist_grouped_faceted.svg @@ -78,7 +78,7 @@ 15 20 -Long sepal: FALSE +Long sepal: FALSE @@ -118,7 +118,7 @@ 6 7 -Long sepal: TRUE +Long sepal: TRUE diff --git a/inst/tinytest/_tinysnapshot/hline.svg b/inst/tinytest/_tinysnapshot/hline.svg index b1637c00..91c295d9 100644 --- a/inst/tinytest/_tinysnapshot/hline.svg +++ b/inst/tinytest/_tinysnapshot/hline.svg @@ -74,7 +74,7 @@ 25 30 -4 +4 @@ -108,7 +108,7 @@ 25 30 -6 +6 @@ -142,7 +142,7 @@ 25 30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/hline_recyle_facet.svg b/inst/tinytest/_tinysnapshot/hline_recyle_facet.svg index 614ff0bc..fee3d513 100644 --- a/inst/tinytest/_tinysnapshot/hline_recyle_facet.svg +++ b/inst/tinytest/_tinysnapshot/hline_recyle_facet.svg @@ -62,7 +62,7 @@ 25 30 -4 +4 @@ -98,7 +98,7 @@ 25 30 -6 +6 @@ -134,7 +134,7 @@ 25 30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/hline_recyle_facet_bycont.svg b/inst/tinytest/_tinysnapshot/hline_recyle_facet_bycont.svg index 5e8e3c75..3ec70579 100644 --- a/inst/tinytest/_tinysnapshot/hline_recyle_facet_bycont.svg +++ b/inst/tinytest/_tinysnapshot/hline_recyle_facet_bycont.svg @@ -77,7 +77,7 @@ 25 30 -4 +4 @@ -111,7 +111,7 @@ 25 30 -6 +6 @@ -145,7 +145,7 @@ 25 30 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/model_glm_facet.svg b/inst/tinytest/_tinysnapshot/model_glm_facet.svg index fb107af7..ce17b74e 100644 --- a/inst/tinytest/_tinysnapshot/model_glm_facet.svg +++ b/inst/tinytest/_tinysnapshot/model_glm_facet.svg @@ -60,7 +60,7 @@ 0.8 1.0 -5 +5 @@ -94,7 +94,7 @@ 0.8 1.0 -6 +6 @@ -128,7 +128,7 @@ 0.8 1.0 -7 +7 @@ -162,7 +162,7 @@ 0.8 1.0 -8 +8 @@ -196,7 +196,7 @@ 0.8 1.0 -9 +9 diff --git a/inst/tinytest/_tinysnapshot/model_lm_facet.svg b/inst/tinytest/_tinysnapshot/model_lm_facet.svg index f5a4800a..fc139248 100644 --- a/inst/tinytest/_tinysnapshot/model_lm_facet.svg +++ b/inst/tinytest/_tinysnapshot/model_lm_facet.svg @@ -56,7 +56,7 @@ 1.0 1.5 -5 +5 @@ -86,7 +86,7 @@ 1.0 1.5 -6 +6 @@ -116,7 +116,7 @@ 1.0 1.5 -7 +7 @@ -146,7 +146,7 @@ 1.0 1.5 -8 +8 @@ -176,7 +176,7 @@ 1.0 1.5 -9 +9 diff --git a/inst/tinytest/_tinysnapshot/model_loess_facet.svg b/inst/tinytest/_tinysnapshot/model_loess_facet.svg index 9bfc49a6..c7d4f21f 100644 --- a/inst/tinytest/_tinysnapshot/model_loess_facet.svg +++ b/inst/tinytest/_tinysnapshot/model_loess_facet.svg @@ -87,7 +87,7 @@ 90 100 -5 +5 @@ -125,7 +125,7 @@ 90 100 -6 +6 @@ -163,7 +163,7 @@ 90 100 -7 +7 @@ -201,7 +201,7 @@ 90 100 -8 +8 @@ -239,7 +239,7 @@ 90 100 -9 +9 diff --git a/inst/tinytest/_tinysnapshot/model_spline_facet.svg b/inst/tinytest/_tinysnapshot/model_spline_facet.svg index ad686b44..eaf598ae 100644 --- a/inst/tinytest/_tinysnapshot/model_spline_facet.svg +++ b/inst/tinytest/_tinysnapshot/model_spline_facet.svg @@ -80,7 +80,7 @@ 80 90 -5 +5 @@ -116,7 +116,7 @@ 80 90 -6 +6 @@ -152,7 +152,7 @@ 80 90 -7 +7 @@ -188,7 +188,7 @@ 80 90 -8 +8 @@ -224,7 +224,7 @@ 80 90 -9 +9 diff --git a/inst/tinytest/_tinysnapshot/ridge_gradient_facet.svg b/inst/tinytest/_tinysnapshot/ridge_gradient_facet.svg index 808e9bcc..b7491819 100644 --- a/inst/tinytest/_tinysnapshot/ridge_gradient_facet.svg +++ b/inst/tinytest/_tinysnapshot/ridge_gradient_facet.svg @@ -55,7 +55,7 @@ 35 40 -0 +0 @@ -84,7 +84,7 @@ 35 40 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_raster_alpha.svg b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_raster_alpha.svg index 5856fd02..2b598a6d 100644 --- a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_raster_alpha.svg +++ b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_raster_alpha.svg @@ -55,7 +55,7 @@ 35 40 -0 +0 @@ -84,7 +84,7 @@ 35 40 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg index f1974287..bf3be825 100644 --- a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg +++ b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg @@ -55,7 +55,7 @@ 35 40 -0 +0 @@ -84,7 +84,7 @@ 35 40 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg index 9223f63c..1b895566 100644 --- a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg +++ b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg @@ -46,7 +46,7 @@ 35 40 -0 +0 @@ -65,7 +65,7 @@ 35 40 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/spineplot_facet.svg b/inst/tinytest/_tinysnapshot/spineplot_facet.svg index edbc8d07..a4956a41 100644 --- a/inst/tinytest/_tinysnapshot/spineplot_facet.svg +++ b/inst/tinytest/_tinysnapshot/spineplot_facet.svg @@ -38,7 +38,7 @@ -1st +1st @@ -49,7 +49,7 @@ -2nd +2nd @@ -60,7 +60,7 @@ -3rd +3rd @@ -71,7 +71,7 @@ -Crew +Crew diff --git a/inst/tinytest/_tinysnapshot/spineplot_facet_by.svg b/inst/tinytest/_tinysnapshot/spineplot_facet_by.svg index 1791afd6..a1c75a3c 100644 --- a/inst/tinytest/_tinysnapshot/spineplot_facet_by.svg +++ b/inst/tinytest/_tinysnapshot/spineplot_facet_by.svg @@ -54,7 +54,7 @@ -1st +1st @@ -65,7 +65,7 @@ -2nd +2nd @@ -76,7 +76,7 @@ -3rd +3rd @@ -87,7 +87,7 @@ -Crew +Crew diff --git a/inst/tinytest/_tinysnapshot/spineplot_facet_by_fancy.svg b/inst/tinytest/_tinysnapshot/spineplot_facet_by_fancy.svg index 255ba201..a92c7559 100644 --- a/inst/tinytest/_tinysnapshot/spineplot_facet_by_fancy.svg +++ b/inst/tinytest/_tinysnapshot/spineplot_facet_by_fancy.svg @@ -38,7 +38,7 @@ -1st +1st @@ -49,7 +49,7 @@ -2nd +2nd @@ -60,7 +60,7 @@ -3rd +3rd @@ -71,7 +71,7 @@ -Crew +Crew diff --git a/inst/tinytest/_tinysnapshot/summary_complex.svg b/inst/tinytest/_tinysnapshot/summary_complex.svg index e177f25c..1a4a7455 100644 --- a/inst/tinytest/_tinysnapshot/summary_complex.svg +++ b/inst/tinytest/_tinysnapshot/summary_complex.svg @@ -77,7 +77,7 @@ 0.90 1.00 -1 +1 @@ -112,7 +112,7 @@ 0.90 1.00 -2 +2 @@ -147,7 +147,7 @@ 0.90 1.00 -3 +3 @@ -182,7 +182,7 @@ 0.90 1.00 -4 +4 diff --git a/inst/tinytest/_tinysnapshot/text_facets.svg b/inst/tinytest/_tinysnapshot/text_facets.svg index a319af21..3fd2b5ab 100644 --- a/inst/tinytest/_tinysnapshot/text_facets.svg +++ b/inst/tinytest/_tinysnapshot/text_facets.svg @@ -74,7 +74,7 @@ 25 30 -0 +0 @@ -108,7 +108,7 @@ 25 30 -1 +1 diff --git a/inst/tinytest/_tinysnapshot/tinyplot_add.svg b/inst/tinytest/_tinysnapshot/tinyplot_add.svg index aedb729f..626fb62a 100644 --- a/inst/tinytest/_tinysnapshot/tinyplot_add.svg +++ b/inst/tinytest/_tinysnapshot/tinyplot_add.svg @@ -76,7 +76,7 @@ 3.5 4.0 -setosa +setosa @@ -112,7 +112,7 @@ 3.5 4.0 -versicolor +versicolor @@ -148,7 +148,7 @@ 3.5 4.0 -virginica +virginica diff --git a/inst/tinytest/_tinysnapshot/tinyplot_add_no_recursive_margins.svg b/inst/tinytest/_tinysnapshot/tinyplot_add_no_recursive_margins.svg index 40bd5ce7..0cc51d5a 100644 --- a/inst/tinytest/_tinysnapshot/tinyplot_add_no_recursive_margins.svg +++ b/inst/tinytest/_tinysnapshot/tinyplot_add_no_recursive_margins.svg @@ -71,7 +71,7 @@ 3.5 4.0 -setosa +setosa @@ -107,7 +107,7 @@ 3.5 4.0 -versicolor +versicolor @@ -143,7 +143,7 @@ 3.5 4.0 -virginica +virginica diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg index f94db9e7..b43fa4e0 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg @@ -81,7 +81,7 @@ 25000 30000 -0 +0 @@ -130,9 +130,9 @@ 25000 30000 -1 +1 -4 +4 @@ -228,7 +228,7 @@ 25000 30000 -6 +6 @@ -324,7 +324,7 @@ 25000 30000 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg index 802469b3..68ade0fd 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg @@ -62,7 +62,7 @@ 25000 30000 -0 +0 @@ -86,9 +86,9 @@ -1 +1 -4 +4 @@ -139,7 +139,7 @@ -6 +6 @@ -202,7 +202,7 @@ 25000 30000 -8 +8 diff --git a/inst/tinytest/_tinysnapshot/violin_facet_by.svg b/inst/tinytest/_tinysnapshot/violin_facet_by.svg index 928b819b..4e1b42f0 100644 --- a/inst/tinytest/_tinysnapshot/violin_facet_by.svg +++ b/inst/tinytest/_tinysnapshot/violin_facet_by.svg @@ -86,7 +86,7 @@ 300 400 -1 +1 @@ -130,7 +130,7 @@ 300 400 -2 +2 @@ -174,7 +174,7 @@ 300 400 -3 +3 @@ -218,7 +218,7 @@ 300 400 -4 +4 diff --git a/inst/tinytest/_tinysnapshot/violin_facet_x_by_same.svg b/inst/tinytest/_tinysnapshot/violin_facet_x_by_same.svg index 53056a99..0c218eb4 100644 --- a/inst/tinytest/_tinysnapshot/violin_facet_x_by_same.svg +++ b/inst/tinytest/_tinysnapshot/violin_facet_x_by_same.svg @@ -68,7 +68,7 @@ 30 40 -3 +3 @@ -96,7 +96,7 @@ 30 40 -4 +4 @@ -124,7 +124,7 @@ 30 40 -5 +5 diff --git a/inst/tinytest/_tinysnapshot/vline_vector.svg b/inst/tinytest/_tinysnapshot/vline_vector.svg index 4e97a48e..a3184079 100644 --- a/inst/tinytest/_tinysnapshot/vline_vector.svg +++ b/inst/tinytest/_tinysnapshot/vline_vector.svg @@ -74,7 +74,7 @@ 25 30 -4 +4 @@ -108,7 +108,7 @@ 25 30 -6 +6 @@ -142,7 +142,7 @@ 25 30 -8 +8 From b32223c9e20c0b323c296abb280a7bfbd2cd3b86 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Fri, 15 May 2026 14:24:12 -0700 Subject: [PATCH 4/5] facet.cex test --- .../_tinysnapshot/facet_cex_large.svg | 361 ++++++++++++++++++ inst/tinytest/test-facet.R | 7 + 2 files changed, 368 insertions(+) create mode 100644 inst/tinytest/_tinysnapshot/facet_cex_large.svg diff --git a/inst/tinytest/_tinysnapshot/facet_cex_large.svg b/inst/tinytest/_tinysnapshot/facet_cex_large.svg new file mode 100644 index 00000000..ead59ea1 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/facet_cex_large.svg @@ -0,0 +1,361 @@ + + + + + + + + + + + + + +Sepal.Length +Sepal.Width + + + + + + + + + + + + + + + + + + +4.5 +5.0 +5.5 +6.0 +6.5 +7.0 +7.5 +8.0 + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 + +setosa + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +4.5 +5.0 +5.5 +6.0 +6.5 +7.0 +7.5 +8.0 + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 + +versicolor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +4.5 +5.0 +5.5 +6.0 +6.5 +7.0 +7.5 +8.0 + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 + +virginica + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/test-facet.R b/inst/tinytest/test-facet.R index 11bac3a0..3542c78d 100644 --- a/inst/tinytest/test-facet.R +++ b/inst/tinytest/test-facet.R @@ -76,6 +76,13 @@ f = function() { } expect_snapshot_plot(f, label = "facet_interaction_newline") +f = function() { + tinyplot(Sepal.Width ~ Sepal.Length, data = iris, + facet = ~Species, facet.args = list(cex = 2, ncol = 1), + theme = "clean") +} +expect_snapshot_plot(f, label = "facet_cex_large") + f = function() { with( mtcars, From 23709a92eb0143c6cb81ce17274c3a58eda423ed Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Fri, 15 May 2026 14:34:20 -0700 Subject: [PATCH 5/5] news --- NEWS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index 22328b12..57a1dedd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -65,6 +65,10 @@ visualizations. - Fixed margin spacing for free facets with different axis scales. The dynamic margin adjustment now computes tick labels per-facet and sizes the margin to accommodate the widest labels. (#579 @grantmcdermott) +- Fixed several minor issues related to facet title strips and spacing: Strips + and spacing now scale correctly with `facet.cex`, multiline facet titles + inter-panel gaps remain fixed regardless of strip height, and strip text is + now vertically centered within the background rect. (#586 @grantmcdermott) ## v0.6.1