dlab-berkeley / R-Data-Visualization-Legacy

D-Lab's 3 hour introduction to data visualization with R. Learn how to create histograms, bar plots, box plots, scatter plots, compound figures, and more using ggplot2 and cowplot.
28 stars 20 forks source link

cowplot() vs. gridExtra() libraries #6

Closed Averysaurus closed 2 years ago

Averysaurus commented 3 years ago

gridExtra() is library that does similar stuff as cowplot(). From the vignette introducitons, it seems like gridExtra() is more expandable , there is more flexibility around how plots can be arranged. Both libraries have github repos, and it looks like cowplot() has been more actively maintained in recent times. See links below for more info:

cowplot() cowplot vignettte cowplot repo

gridExtra() gridExtra vignette gridExtra repo

EastBayEv commented 3 years ago

Thanks @Averysaurus! I like this. Personally, I started with gridExtra, then moved to cowplot, and now I use patchwork. This might be useful for your comparison as well: https://cran.r-project.org/web/packages/patchwork/vignettes/patchwork.html

asteves commented 2 years ago

My view here is that we should pick one and stick with it, instead of providing options. From a workshop standpoint, the fact that there are many ways to do the task means that the coverage for any one will be limited.

As of this comment, cowplot has double the downloads per month. That is not a reason to not try patchwork or gridExtra, just a thought about where the workshop should go.

pssachdeva commented 2 years ago

I am fine sticking with cowplot for now. patchwork is definitely an exciting new package, but I think we can wait for it to develop a little more before replace cowplot with it. Right now, we reference the other packages, which should be fine.