Skip to content

Commit e0f1040

Browse files
authored
renamed panel titles in gtable of plot with facet_grid() (#3979)
1 parent 885c3c1 commit e0f1040

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/facet-grid-.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ FacetGrid <- ggproto("FacetGrid", Facet,
338338

339339
panel_table <- gtable_matrix("layout", panel_table,
340340
panel_widths, panel_heights, respect = respect, clip = coord$clip, z = matrix(1, ncol = ncol, nrow = nrow))
341-
panel_table$layout$name <- paste0('panel-', rep(seq_len(ncol), nrow), '-', rep(seq_len(nrow), each = ncol))
341+
panel_table$layout$name <- paste0('panel-', rep(seq_len(nrow), ncol), '-', rep(seq_len(ncol), each = nrow))
342342

343343
panel_table <- gtable_add_col_space(panel_table,
344344
theme$panel.spacing.x %||% theme$panel.spacing)

0 commit comments

Comments
 (0)