Legend on bottom, two rows wrapped in ggplot2 in r January 8, 2023 by Tarik You were really close. Try this at the very end: gg+guides(fill=guide_legend(nrow=2,byrow=TRUE))