0

I need to increase the white space between the legend items in below graph, therefore I need white space between the red square Man row and the blue square Woman row. This question has been asked before on here and all answers seem to recommend using guides(color = guide_legend(byrow = TRUE)) + theme(legend.spacing.y = unit(1, "cm")) but all this does in below plot increase white space between the legend title and legend items, which I don't need to happen. How can I increase white space between the legend items?

library(waffle); library(ggplot2); library(tibble)

tibble(sex = factor(c("Man", "Woman"), levels=c("Man", "Woman")), consumption = c(16, 20)) -> 
  df

ggplot(df, aes(fill = sex, values = consumption)) +
  geom_waffle(n_rows = 10, make_proportional = TRUE) +
  coord_equal() +
  theme_enhance_waffle() +
  guides(color = guide_legend(byrow = TRUE)) +
  theme(legend.spacing.y = unit(1, "cm"))

enter image description here

luciano
  • 13,158
  • 36
  • 90
  • 130

0 Answers0