Closed
Description
Related to #5628
I would like to change this line:
Line 289 in 4dedb82
plot_margin <- calc_element("plot.margin", theme) %||% margin()
here is the problem:
copy your code to the clipboard and run:
library(ggplot2)
default_margin <- ggplot(mtcars, aes(disp, mpg)) +
geom_point()
no_margin <- ggplot(mtcars, aes(disp, mpg)) +
geom_point() +
theme(plot.margin = NULL)
length(ggplotGrob(default_margin)$widths)
#> [1] 13
length(ggplotGrob(no_margin)$widths)
#> [1] 11
length(ggplotGrob(default_margin)$heights)
#> [1] 16
length(ggplotGrob(no_margin)$heights)
#> [1] 14
Created on 2024-12-12 with reprex v2.1.0
~
~
Metadata
Metadata
Assignees
Labels
No labels