title: Add a common legend
body: <p>I was trying to do a multiplot with <code>ggplot2</code>. 
  This was my initial code</p>
  
  <pre><code>nucmer_s1 &lt;- ggarrange(eight_uniform, ten_uniform, twelve_uniform, fourteen_uniform, sixteen_uniform, 
                         ncol=3, nrow=2, common.legend = TRUE, legend="bottom") 
  </code></pre>
  
  <p>getting this error </p>
  
  <blockquote>
    <p>Error in plot$scales : $ operator is invalid for atomic vectors</p>
  </blockquote>
  
  <p>then.</p>
  
  <pre><code>annotate_figure(nucmer_s1, 
                  top = text_grob("Genomas validados con distribución de datos equilibrada",
                  color = "black", face = "bold", size = 12))
  </code></pre>
  
  <p>however I obtain the graphic
  <a href="https://i.stack.imgur.com/dThZk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dThZk.jpg" alt="enter image description here"></a>
  But I need to put a title in the each plot a title so I changed to this one </p>
  
  <pre><code>nucmer_s1 &lt;-grid.arrange(
    eight_uniform + ggtitle("8 genomas"), 
    ten_uniform +  ggtitle("10 genomas"), 
    twelve_uniform + ggtitle("12 genomas"), 
    fourteen_uniform + ggtitle("14 genomas"), 
    sixteen_uniform + ggtitle("16 genomas"), 
    ncol=3, nrow=2, common.legend = TRUE, legend="bottom")
  </code></pre>
  
  <p>but I got </p>
  
  <blockquote>
    <p>Error in gList(list(grobs = list(list(x = 0.5, y = 0.5, width = 1, height = 1,  :<br>
          only 'grobs' allowed in "gList"<br>
        Además: Warning messages:<br>
        1: In grob$wrapvp &lt;- vp : Realizando coercion de LHD a una lista<br>
        2: In grob$wrapvp &lt;- vp : Realizando coercion de LHD a una lista</p>
  </blockquote>
  
  <p>so I erase the <code>common.legend</code> part
  and got this plot</p>
  
  <p><a href="https://i.stack.imgur.com/arovD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/arovD.jpg" alt="enter image description here"></a>
  So I have two questions:   </p>
  
  <ul>
  <li><p>Is there a way to put a title in each plot with the grey box without using <code>facet_grid</code> (cause I don't have that info in the data)? and </p></li>
  <li><p>Is there any way to put the legend in the blank side of a multi-plot?</p></li>
  </ul>
  
  <p>Thank so much for your help</p>