📜  legend.box.spacing ggplot 2 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:06.309000             🧑  作者: Mango

代码示例1
library(ggplot2)

ggplot(mtcars, aes(factor(cyl), fill = factor(cyl))) + 
  geom_bar() +
  coord_flip() +
  scale_fill_brewer("Cyl", palette = "Dark2") +
  theme_minimal(base_size = 14) +
  theme(legend.position = 'top', 
        legend.spacing.x = unit(1.0, 'cm'))