-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
I found a problem with the margins of plot titles: The left margin of a plot title seems to be ignored if it is specified via theme()
.
In the following examples, I would expect to see the plot title be indented in version B as compared to version A.
# version A:
ggplot(mtcars, aes(x = cyl, y = mpg)) +
geom_point() +
ggtitle("Version A: no margins specified")
# version B:
ggplot(mtcars, aes(x = cyl, y = mpg)) +
geom_point() +
ggtitle("Version B: left margin of 20mm expected") +
theme(plot.title = element_text(margin = margin(l = 20, unit = "mm")))
This potential bug is also reported in this stackoverflow question (not mine).
Metadata
Metadata
Assignees
Labels
No labels