Skip to content

Commit 5a18687

Browse files
authored
fix stacking (#1817)
Fixes #1812
1 parent 32ee97b commit 5a18687

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/facet-grid-.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ FacetGrid <- ggproto("FacetGrid", Facet,
311311
}
312312

313313
panel_table <- gtable_matrix("layout", panel_table,
314-
panel_widths, panel_heights, respect = respect, clip = "on")
314+
panel_widths, panel_heights, respect = respect, clip = "on", z = matrix(1, ncol = ncol, nrow = nrow))
315315
panel_table$layout$name <- paste0('panel-', rep(seq_len(ncol), nrow), '-', rep(seq_len(nrow), each = ncol))
316316

317317
panel_table <- gtable_add_col_space(panel_table,

R/facet-wrap.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ FacetWrap <- ggproto("FacetWrap", Facet,
231231
empties <- apply(panel_table, c(1,2), function(x) is.zero(x[[1]]))
232232
panel_table <- gtable_matrix("layout", panel_table,
233233
widths = unit(rep(1, ncol), "null"),
234-
heights = unit(rep(aspect_ratio, nrow), "null"), respect = respect, clip = "on")
234+
heights = unit(rep(aspect_ratio, nrow), "null"), respect = respect, clip = "on", z = matrix(1, ncol = ncol, nrow = nrow))
235235
panel_table$layout$name <- paste0('panel-', rep(seq_len(ncol), nrow), '-', rep(seq_len(nrow), each = ncol))
236236

237237
panel_table <- gtable_add_col_space(panel_table,

0 commit comments

Comments
 (0)