patchwork
patchwork copied to clipboard
fix: respect `theme(strip.placement)` when strip position is ambiguous
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)
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.