Closed
Description
Hello,
I noticed there was difference in the vertical space between legend keys when switching between themes e.g. from theme_grey
to theme_bw
(see the reprex below). I wonder what was the cause of that?
Thanks!
### ggplot2 3.1.0.9000 (2019-03-06)
library(ggplot2)
theme_set(theme_grey(base_size = 14))
p1 <- ggplot(mtcars) +
aes(fill = factor(cyl), x = cyl) +
geom_bar() +
theme(
legend.key = element_rect(size = 6),
legend.key.size = unit(1, "cm")
)
print(p1)
theme_set(theme_bw(base_size = 14))
p2 <- ggplot(mtcars) +
aes(fill = factor(cyl), x = cyl) +
geom_bar() +
theme(
legend.key = element_rect(size = 6),
legend.key.size = unit(1, "cm")
)
print(p2)