title: R: Reversing the fill order in a double bar graph
body: <p>Hi I have a double bar graph. I have searched for it, but I can't quite get what I want. Example of searches. </p>
  
  <p><a href="https://stackoverflow.com/questions/16134596/reverse-fill-order-of-stacked-bars-with-faceting">Reverse fill order of stacked bars with faceting</a></p>
  
  <p><a href="https://stackoverflow.com/questions/29155985/r-ggplot2-reverse-order-of-bar">R - ggplot2 reverse order of bar</a></p>
  
  <p><a href="https://stackoverflow.com/questions/12566697/in-ggplot2-for-r-how-do-i-reverse-the-order-of-the-bar-colors">In ggplot2 for R, how do I reverse the order of the bar colors?</a></p>
  
  <p>Unfortunately I dont have enough reputation to post an image :(</p>
  
  <p>Here is my code:</p>
  
  <pre><code>dat9 &lt;- data.frame(
    Response = factor(c("Yes","Yes","Yes","Yes","Yes","No", "No", "No",  "No", "No")),
    Category = factor(c("Under 45","45-64","65+","Men","Women","Under 45", "45-64", "65+", "Men", "Women"), levels=c("Under 45","45-64","65+", "Men", "Women")),
    percentage = c(79, 69, 44, 65, 72, 16, 22, 39, 25, 20))
  
  ggplot(data=dat9, aes(x=Category, y=percentage, fill=Response,)) +
    geom_bar(stat="identity", position=position_dodge(), colour="black")
  </code></pre>
  
  <p>(Not enough reputation to post PNG!)</p>
  
  <p>I would like to reverse the red and blue bars in the image. Also reverse the blue and red box in the legend.</p>
  
  <p>Updated (Added PNG)
  <img src="https://i.stack.imgur.com/pXriD.png" alt="enter image description here"></p>