title: legend box color changes if 2 legends in ggplot
body: <p>I am trying to generate a ggplot based on the following df</p>
  <pre><code>df &lt;- data.frame(
    Input = c(&quot;S1&quot;, &quot;S2&quot;, &quot;S3&quot;, &quot;S4&quot;),
    Brand = c(&quot;Brand01&quot;, &quot;Brand01&quot;, &quot;Brand01&quot;, &quot;Brand01&quot;, &quot;Brand02&quot;,&quot;Brand02&quot;,&quot;Brand02&quot;,&quot;Brand02&quot;),
    Average = c(21.52027, 21.60699, 20.77871, 21.22759, 25.05574, 22.74372, 22.80795, 22.98509),
    Limit = c(31.89098, 31.89098, 31.89098, 31.89098, 31.57953, 31.57953, 31.57953, 31.57953))
  
  p = ggplot(df, aes(x=Input, y=Average, fill=Brand)) +
         facet_wrap(~ Brand, ncol = 2) +
         geom_bar(stat=&quot;identity&quot;, position=position_dodge(), colour=&quot;black&quot;, width = 0.9, show.legend = FALSE) +
         xlab(&quot;Input&quot;) + ylab(&quot;Average&quot;) +
         theme(axis.title.x = element_text(size=14), axis.title.y = element_text(size=14),
               legend.text = element_text(size=14), plot.title = element_text(size = 20, face = &quot;bold&quot;),
               axis.text.x = element_text(size=6))+ 
         theme(axis.text.x = element_text(angle = 90)) +
         geom_hline(aes(yintercept=Limit, linetype = &quot;dashed&quot;), color = &quot;red&quot;) +
         scale_linetype_manual(name = &quot;Limit&quot;, values = &quot;dashed&quot;, labels = &quot;&quot;)
  
  </code></pre>
  <p>When <code>show.legend = FALSE</code> then the plot looks like that <a href="https://i.stack.imgur.com/33B4G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/33B4G.png" alt="enter image description here" /></a>
  But when I have <code>show.legend = TRUE</code>
  then the box of the Limit changes color, and I want to have it &quot;grey&quot; or white as in the first plot. <a href="https://i.stack.imgur.com/AEuLh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AEuLh.png" alt="enter image description here" /></a> I tried some tips from other relevant topics, but nothing worked.</p>