title: Change legend shape size for fill using geom_bar
body: <p><strong>Here is my reproducible code:</strong></p>
  
  <p>This is an example of what I want my actual figure to look like.</p>
  
  <pre><code>library(tidyverse)
  p &lt;- mtcars %&gt;%
    mutate(cyl = factor(cyl)) %&gt;%
    ggplot(aes(carb)) + 
    geom_bar(aes(fill = cyl)) +
    scale_fill_manual(values = c("Red","Green","Blue"))
  </code></pre>
  
  <p><strong>Resulting figure:</strong>
  <a href="https://i.stack.imgur.com/wdmgu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wdmgu.png" alt="Example histogram"></a></p>
  
  <p><strong>Problem:</strong></p>
  
  <p>What I want to change is in the legend. The boxes depicting the color of the bars on the histogram are too big and I want to reduce the size.</p>
  
  <p><strong>Attempted Solutions:</strong></p>
  
  <p>I have tried this code from another <a href="https://stackoverflow.com/questions/40469757/change-the-shape-of-legend-key-for-geom-bar-in-ggplot2">stackoverflow question</a> and it does not work:</p>
  
  <pre><code>p &lt;- p + guides(fill = guide_legend(override.aes = list(width = .5)))
  </code></pre>
  
  <p>In the reference stackoverflow question, another user suggested making a dummy geom_point variable and then using that legend as the legend and removing the fill legend. I would rather not have to do that if possible.</p>
  
  <p>Thank you for the help.</p>