Skip to content

Commit

Permalink
Fix #340
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Jan 4, 2024
1 parent 686275d commit 77a1e1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Collecting axes will remove duplicated axes in the x- or y-direction.
Collecting axis titles will also remove duplicated titles in the x- or
y-direction, but also merge duplicated titles in the other direction (#150).
* Fix a bug that prevented faceted plots with axes on the right from being
used (#340)

# patchwork 1.1.3

Expand Down
2 changes: 1 addition & 1 deletion R/plot_patchwork.R
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ add_strips <- function(gt) {
}
if (!any(grepl('strip-l', gt$layout$name))) {
gt <- gtable_add_cols(gt, unit(0, 'mm'), panel_loc$l - 1 - strip_pos)
} else if (strip_pos == 2) {
} else if (strip_pos == 2 && !any(gt$layout$l == panel_loc$l - 2)) {
gt$widths[panel_loc$l - 1] <- sum(gt$widths[panel_loc$l - c(1, 2)])
gt <- gt[, -(panel_loc$l - 2)]
}
Expand Down

0 comments on commit 77a1e1b

Please sign in to comment.