title: How to annotate across or between plots in multi-plot panels in R
body: <p>If I have several plots in a single panel, I would like to be able to put text annotations that go across more than one plot area or that go in between plot areas. I'm sure there must be a way to do this, but I need some help figuring out how.<br>
  Here's some fake data to create four plots on one panel: </p>
  
  <pre><code>x1 = rnorm(100)
  x2 = rnorm(100)
  x3 = rnorm(100)
  x4 = rnorm(100)
  
  par(mfrow=c(2,2)) 
  hist(x1, xlab="", main="Group A")
  hist(x2, xlab="", main="Group B")
  hist(x3, xlab="", main="")
  hist(x4, xlab="", main="")
  </code></pre>
  
  <p>This creates the multi-plot panel below, except that I've also added text in red. I added the red text by annotating the PDF file <em>after</em> I created the graph panel in R and then saved it as a PDF. What I'd like to learn is how to annotate the graph panel programmatically within R, rather than having to save it and annotate the saved file.<br>
  Normally, I would just add an annotation using <code>text()</code> or <code>mtext()</code>. But that only works if you're annotating a single graph. Is there a way to add annotations relative to the coordinates of the entire panel of 4 graphs? I'm looking for a solution in base graphics right now, but if anyone knows how to do something similar in ggplot2 or lattice, I'd be interested in seeing that as well.
  <img src="https://i.stack.imgur.com/TLEYF.png" alt="enter image description here"></p>