title: How do I manually set geom_bar fill color in ggplot
body: <p>I'm trying to create several graphs using ggplot. The graphs are a series of bar graphs that together describe a line as well <a href="https://imgur.com/B9dyi6q" rel="noreferrer">EXAMPLE</a>   (BTW, yes I realize the color palette is ugly, it's color-blind friendly which is important for my audience)</p>
  
  <p>My issue is that I need to make several of these graphs and I want the colors to stay consistent across all of them. Since the "Type" variable comes up in different orders across the several datasets I'm going to be using, I need to manually set a color for each type. I thought that this question : <a href="https://stackoverflow.com/questions/10016316/how-to-manually-fill-colors-in-a-ggplot2-histogram">How to manually fill colors in a ggplot2 histogram</a> would have the answer, but when I try that, it changes the names in the legend to the hex definition of the color, but the colors themselves go back to ggplot's default palette. </p>
  
  <p>Here's the code I have so far:</p>
  
  <pre><code>  cbbPalette &lt;- c("#000000", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
  
   ggplot()+
      scale_fill_manual(values=cbbPalette)+
      geom_bar(data=subset(eten, Type=="Waste Wood"), aes(x=Tprod, y=acost, fill=cbbPalette[1], width=MGGEY+25), stat="identity")+
      geom_bar(data=subset(eten, Type=="Agricultural Residue"), aes(x=Tprod, y=acost, fill=cbbPalette[2], width=MGGEY+25), stat="identity")+
      geom_bar(data=subset(eten, Type=="Forest Residue"), aes(x=Tprod, y=acost, fill=cbbPalette[3], width=MGGEY+25), stat="identity")+
      geom_bar(data=subset(eten, Type=="Herbaceous Energy Crop"), aes(x=Tprod, y=acost, fill=cbbPalette[4], width=MGGEY+25), stat="identity")+
      geom_bar(data=subset(eten, Type=="MSW"), aes(x=Tprod, y=acost, fill=cbbPalette[5], width=MGGEY+25), stat="identity")+
      scale_y_continuous("Average Cost", labels = dollar, expand=c(0,0))+
      scale_x_continuous("Million Gallons of Gasoline Equivalent", expand=c(0,0))+
      theme(legend.position="bottom", panel.background=element_rect(colour = NA, fill = "white"), axis.line=element_line(), panel.grid.major.y=element_line(colour="black"), panel.grid.minor=element_blank())
  </code></pre>
  
  <p>My level of R expertise is fairly low, so I may be missing something simple, but I can't get it to work on my own. Thanks in advance for the help.</p>
  
  <p>Update: I inadvertently pasted an incorrect version of my code, the "fill" commands are back to my best guess. An example dataset is <a href="https://www.dropbox.com/s/gi6ewcpfz2qfgwp/eten.csv" rel="noreferrer">here</a>.</p>