Skip to content

Commit 77a1e1b

Browse files
committed
Fix #340
1 parent 686275d commit 77a1e1b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Collecting axes will remove duplicated axes in the x- or y-direction.
55
Collecting axis titles will also remove duplicated titles in the x- or
66
y-direction, but also merge duplicated titles in the other direction (#150).
7+
* Fix a bug that prevented faceted plots with axes on the right from being
8+
used (#340)
79

810
# patchwork 1.1.3
911

R/plot_patchwork.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ add_strips <- function(gt) {
689689
}
690690
if (!any(grepl('strip-l', gt$layout$name))) {
691691
gt <- gtable_add_cols(gt, unit(0, 'mm'), panel_loc$l - 1 - strip_pos)
692-
} else if (strip_pos == 2) {
692+
} else if (strip_pos == 2 && !any(gt$layout$l == panel_loc$l - 2)) {
693693
gt$widths[panel_loc$l - 1] <- sum(gt$widths[panel_loc$l - c(1, 2)])
694694
gt <- gt[, -(panel_loc$l - 2)]
695695
}

0 commit comments

Comments
 (0)