Skip to content

Commit 31b01aa

Browse files
teunbrandthomasp85
authored andcommitted
fill potentially missing args (#5634)
1 parent 472011c commit 31b01aa

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

R/facet-grid-.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ FacetGrid <- ggproto("FacetGrid", Facet,
338338
cli::cli_abort("{.fn {snake_class(coord)}} doesn't support free scales.")
339339
}
340340

341+
# Fill missing parameters for backward compatibility
342+
params$draw_axes <- params$draw_axes %||% list(x = FALSE, y = FALSE)
343+
params$axis_labels <- params$axis_labels %||% list(x = TRUE, y = TRUE)
344+
341345
if (!params$axis_labels$x) {
342346
cols <- seq_len(nrow(layout))
343347
x_axis_order <- as.integer(layout$PANEL[order(layout$ROW, layout$COL)])

R/facet-wrap.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ FacetWrap <- ggproto("FacetWrap", Facet,
275275
panels <- panels[panel_order]
276276
panel_pos <- convertInd(layout$ROW, layout$COL, nrow)
277277

278+
# Fill missing parameters for backward compatibility
279+
params$draw_axes <- params$draw_axes %||% list(x = FALSE, y = FALSE)
280+
params$axis_labels <- params$axis_labels %||% list(x = TRUE, y = TRUE)
281+
278282
x_axis_order <- if (params$axis_labels$x) layout$SCALE_X else seq(n)
279283
y_axis_order <- if (params$axis_labels$y) layout$SCALE_Y else seq(n)
280284

0 commit comments

Comments
 (0)