Skip to content

Commit faded39

Browse files
committed
Fix panel sizing. Fixes #312
1 parent 14ac5e4 commit faded39

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

R/facet-grid-.r

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ facet_render.grid <- function(facet, panel, coord, theme, geom_grobs) {
184184
axes$l$heights <- panels$heights
185185
axes$b$widths <- panels$widths
186186

187+
# adjust the size of the strips to the size of the panels
188+
strips$r$heights <- panels$heights
189+
strips$t$widths <- panels$widths
190+
187191
# Combine components into complete plot
188192
top <- strips$t
189193
top <- gtable_add_cols(top, strips$r$widths)
@@ -332,6 +336,7 @@ facet_panels.grid <- function(facet, panel, coord, theme, geom_grobs) {
332336
panel_widths, panel_heights, respect = respect)
333337
panels <- gtable_add_col_space(panels, theme$panel.margin)
334338
panels <- gtable_add_row_space(panels, theme$panel.margin)
339+
335340
panels
336341
}
337342

0 commit comments

Comments
 (0)