wilkelab / cowplot

cowplot: Streamlined Plot Theme and Plot Annotations for ggplot2
https://wilkelab.org/cowplot/
704 stars 84 forks source link

[Feature request] Automatic legend extraction for compound plots with a shared legend #140

Open apcamargo opened 5 years ago

apcamargo commented 5 years ago

If the user wants to draw a compound plot with a shared legend, it needs to manually extracted the legend and add it to the compound figure. A nicer interface would be to add an option to plot_grid to request a shared legend (akin to the ggarrange function of ggpubr).

clauswilke commented 5 years ago

Is there anything wrong with using ggpubr::ggarrange()? It's just a wrapper around plot_grid() anyways.

apcamargo commented 5 years ago

No, no problem at all. I didn't check the code of ggarrange, so I didn't know it uses plot_grid.