Skip to content

Commit 9552a67

Browse files
committed
add padding cell in final gtable for NULL plot.margin
1 parent 4193a50 commit 9552a67

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
@@ -285,7 +285,7 @@ ggplot_gtable.ggplot_built <- function(data) {
285285
plot_table <- table_add_tag(plot_table, plot$labels$tag, theme)
286286

287287
# Margins
288-
plot_margin <- calc_element("plot.margin", theme)
288+
plot_margin <- calc_element("plot.margin", theme) %||% margin()
289289
plot_table <- gtable_add_padding(plot_table, plot_margin)
290290

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

0 commit comments

Comments
 (0)