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