This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Arranging two plots in ggplot

Hi, I have a quick question. I made two plots p1 and p2 and arranged them in two rows (p1 at top, p2 at bottom) in ggplot (R). I used p1 / p2 to do this. I have more data points in p1 and wanted to make it like 80% of the height and fit p2 in the remaining space. I want the width to be the same for both. Any quick code to do this? I searched but could not find any solution. Thank you for helping.

arrange ggplot

1 answer

Lots of examples for this: https://patchwork.data-imaginist.com/articles/guides/layout.html

Log in to answer this question.