Skip to content

Commit ebecea5

Browse files
authored
add padding cell in final gtable for NULL plot.margin (#6235)
1 parent 4c84e8a commit ebecea5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/plot-build.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ ggplot_gtable.ggplot_built <- function(data) {
286286
plot_table <- table_add_tag(plot_table, plot$labels$tag, theme)
287287

288288
# Margins
289-
plot_margin <- calc_element("plot.margin", theme)
289+
plot_margin <- calc_element("plot.margin", theme) %||% margin()
290290
plot_table <- gtable_add_padding(plot_table, plot_margin)
291291

292292
if (is.theme_element(theme$plot.background)) {

0 commit comments

Comments
 (0)