patchwork icon indicating copy to clipboard operation
patchwork copied to clipboard

fix: respect `theme(strip.placement)` when strip position is ambiguous

Open Yunuuuu opened this issue 7 months ago • 1 comments

fix https://github.com/thomasp85/patchwork/issues/446

This PR ensures that add_strips() respects the strip.placement setting in the theme.

library(ggplot2)

set_theme(theme_classic() + theme(strip.placement = "outside"))

p1 <- ggplot(mtcars) + geom_point(aes(mpg, disp))
p2 <- ggplot(mtcars) + geom_boxplot(aes(gear, disp, group = gear))
p3 <- ggplot(mtcars) + geom_bar(aes(gear)) + facet_wrap(~cyl)

p1 / (p3 | p2)
image

Yunuuuu avatar Aug 26 '25 12:08 Yunuuuu

I’m not sure why the PR failed the GitHub Actions check, since it succeeds on my local machine. I also noticed that all tests were already failing before this PR.

Yunuuuu avatar Aug 26 '25 13:08 Yunuuuu