title: Grouped bar graph custom colours
body: <p>I have the following data and wish to create a grouped bar graph like so:</p>
  
  <pre><code>data&lt;-as.data.frame(c("a","b","c","a","b","c"))
  colnames(data)&lt;-"Y"
  
  data$X&lt;-c("x","x","x","y","y","y")
  
  data$Z&lt;-c(1,2,3,1,2,3)
  
  ggplot(data, aes(x=X, y=Z, fill=Y) +
    geom_bar(stat="identity", colour="black", position="dodge", size=0.25, width=0.8, alpha=0.8) +
    scale_fill_manual(values=c("red","red","red","blue","blue","blue"))
  </code></pre>
  
  <p>In the last line of the code I wish to change the colours of the bars - I would like that all of the bars of group "x" be coloured red and the bars of group "y" to be coloured blue. However as the result below shows, I cannot manage to do this using <code>scale_fill_manual</code>.
  <img src="https://i.stack.imgur.com/ASyFg.png" alt="enter image description here"></p>