title: Is there a way to manually add custom legend keys with custom rows in ggplot2 with guide_legend
body: <p>I would like to customize the number of rows appear in the legend. Here is my data frame.</p>
  <pre><code>df = data.frame(label = c(&quot;A&quot;, &quot;A&quot;, &quot;B&quot;, &quot;C&quot;, &quot;D&quot;, &quot;E&quot;, &quot;F&quot;, &quot;G&quot;, &quot;H&quot;, &quot;I&quot;, &quot;J&quot;, &quot;K&quot;, &quot;L&quot;, &quot;M&quot;),
                  x = c(1, 2, 4, 5, 6, 2, 3, 4, 5, 6, 2, 3, 5, 3),
                  y = c(3, 5, 6, 2, 5, 3, 5, 3, 2, 3, 6, 7, 1, 3))
  ggplot(df, aes(x = x, y = y, colour = label, group = label, fill = label))  +
    geom_point() + guides(colour = guide_legend(nrow= 3))
  
  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/XPcFN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XPcFN.png" alt="enter image description here" /></a></p>
  <p>But What I really want is the row with 3 nrow followed by 2 nrow. Like this uploaded picture. Any help is appreciated.
  <a href="https://i.stack.imgur.com/iRSaG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iRSaG.png" alt="enter image description here" /></a></p>