Skip to content

Commit a9eb249

Browse files
committed
Shared titles and axes in wrap_plots()
1 parent c6a7c18 commit a9eb249

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

R/wrap_plots.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
#'
4747
wrap_plots <- function(..., ncol = NULL, nrow = NULL, byrow = NULL,
4848
widths = NULL, heights = NULL, guides = NULL,
49-
tag_level = NULL, design = NULL) {
49+
tag_level = NULL, design = NULL, axes = NULL,
50+
axis_titles = axes) {
5051
if (is_valid_plot(..1)) {
5152
plots <- list(...)
5253
} else if (is.list(..1)) {
@@ -68,7 +69,8 @@ wrap_plots <- function(..., ncol = NULL, nrow = NULL, byrow = NULL,
6869
}
6970
Reduce(`+`, plots, init = plot_filler()) + plot_layout(
7071
ncol = ncol, nrow = nrow, byrow = byrow, widths = widths, heights = heights,
71-
guides = guides, tag_level = tag_level, design = design
72+
guides = guides, tag_level = tag_level, design = design, axes = axes,
73+
axis_titles = axis_titles
7274
)
7375
}
7476

man/wrap_plots.Rd

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)