title: Formatting ggplot2 legend text in rows with "empty" slots
body: <p>I am trying to format the legend in my the plot below. This is some dummy data and my code:</p>
  <pre><code>df &lt;- data.frame(supplement = c(&quot;Control&quot;, 
                              &quot;0.5 mM NA&quot;, &quot;5 mM NA&quot;, &quot;10 mM NA&quot;,
                              &quot;0.5 mM NI&quot;, &quot;5 mM NAI&quot;, &quot;10 mM NI&quot;),
               axis1 = c(1, 2, 3, 4, 5, 6, 7),
               axis2 = c(7, 6, 5, 4, 3, 2, 1))
  
  df %&gt;%
    mutate(supplement = factor(supplement,
                               levels = c(&quot;Control&quot;, 
                                          &quot;0.5 mM NA&quot;, &quot;5 mM NA&quot;, &quot;10 mM NA&quot;,
                                          &quot;0.5 mM NI&quot;, &quot;5 mM NAI&quot;, &quot;10 mM NI&quot;))) %&gt;%
    ggplot(aes(x = axis1, y = axis2)) +
    geom_point(aes(color = supplement), size = 4) +
    labs(y = &quot;Axis 2&quot;,
         x = &quot;Axis 1&quot;) +
    scale_colour_manual(name = &quot;&quot;,
                        breaks = c(&quot;Control&quot;, 
                                   &quot;0.5 mM NA&quot;, &quot;5 mM NA&quot;, &quot;10 mM NA&quot;,
                                   &quot;0.5 mM NI&quot;, &quot;5 mM NAI&quot;, &quot;10 mM NI&quot;),
                        labels = c(&quot;No Treatment&quot;,
                                   &quot;0.5 mM Nitrate&quot;, &quot;5 mM Nitrate&quot;, &quot;10 mM Nitrate&quot;,
                                   &quot;0.5 mM Nitrite&quot;, &quot;5 mM Nitrite&quot;, &quot;10 mM Nitrite&quot;),
                        values =  c(&quot;#003F5C&quot;,
                                    &quot;#824ED4&quot;, &quot;#31B3F7&quot;, &quot;#FFA600&quot;,
                                    &quot;#ABF13D&quot;, &quot;#DC267F&quot;, &quot;#16F5E3&quot;))+
    guides(color = guide_legend(order = 1, nrow = 2, byrow = TRUE)) +
    theme(legend.title = element_blank(),
          legend.text = element_text(size = unit(14, &quot;pt&quot;)),
          legend.position = &quot;bottom&quot;,
          legend.box = &quot;vertical&quot;,
          axis.title = element_text(size = unit(16, &quot;pt&quot;)),
          axis.text = element_text(size = unit(14, &quot;pt&quot;)),
          legend.key.size = unit(25, &quot;pt&quot;),
          legend.key.width = unit(0, 'mm'))
  </code></pre>
  <p>What I get is this.</p>
  <p><img src="https://i.stack.imgur.com/H86Ie.jpg" alt="ggplot I get" /></p>
  <p>But I would really like them to be like this. However I dont know if this is even possible in ggplot as I have not found anything that would do this.</p>
  <p><img src="https://i.stack.imgur.com/BUpzg.jpg" alt="ggplot I want" /></p>