ggplot combine function legend code example Example: common legend for multiple plots in r # for ggplot ggarrange(bxp, dp, common.legend = TRUE)