1

I want to plot two graphs in one figure. These two graphs are plotted using ggplot2 package. Afterwards I used the following code.

grid.arrange(p1,p2,ncol=2)

My question, is there is a possibility to put in the output of grid.arrange below the two graphs subscripts like 1) and 2) or a) and b), so that helps making reference in the text easier than telling that picture on the (top) right and etc.

Gera Kuiv
  • 21
  • 4
  • There is now a `tag` labeling option in ggplot2 (see, e.g., `?ggplot2::labs`), which would allow you to tag these prior to combining. Other "plot combining" packages, like **cowplot** and **egg**, having tagging options, as well. – aosmith Jun 14 '19 at 13:29
  • Having a reproducible example in your question will help people help you. :) This doesn't have to be your full data and code (which is often overly complicated), but any small example dataset with code that demonstrates the problem. See, e.g., [here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) for some ideas on how to make a reproducible example. – aosmith Jun 14 '19 at 13:34

0 Answers0