title: How to establish specific colors in a barplot in ggplot R?
body: <p>I am currently working on a dataframe and I want to make a barplot in which every cloumn is related to a variable, and I want to assign to each column (each bar of the barplot) an specific color, different than the predefined color assigned by <code>ggplot</code>.</p>
  
  <p>This is my dataframe</p>
  
  <pre><code>    Abstencion    PP    PSOE    IU    UPyD   Ahora.madrid Ciudadanos Year
  1      40.86     27.79  20.20  5.72   0.00         0.00       0.00  a91
  2      28.87     37.35  19.62 11.02   0.00         0.00       0.00  a95
  3      39.94     29.54  21.49  5.17   0.00         0.00       0.00  a99
  4      31.07     35.21  25.18  4.95   0.00         0.00       0.00  a03
  5      34.09     36.48  20.28  5.69   0.00         0.00       0.00  a07
  6      32.78     32.79  15.79  7.09   5.18         0.00       0.00  a11
  7      31.15     23.62  10.44  1.16   1.25        21.76       7.81  a15
  </code></pre>
  
  <p>The columns of the dataset are actually political parties in my country, so I want to produce a barplot depending on the year, in which each column should be plotted in the colour of the political party. </p>
  
  <p>I already designed the color vector:</p>
  
  <pre><code>col &lt;- c("black","dodgerblue","firebrick1","chartreuse3",
           "deeppink","darkorchid3","darkorange1")
  </code></pre>
  
  <p>And I developed this code to do the barplots (suppose my dataframe is X) </p>
  
  <pre><code>library(ggplot2)
  library(reshape2)
  a &lt;- X[1,]
  a.molten &lt;- melt(a, value.name="Votes", variable.name="Party")
  #Eliminar los partidos politicos que sacaron 0 votos
  a.molten &lt;- a.molten[-which(a.molten$Votes==0),] 
  ggplot(a.molten, aes(x=Party, y=Votes, fill=Party)) + geom_bar(stat="identity")
  </code></pre>
  
  <p>changing the parameter from  <code>a &lt;- X[i,]</code> will produce the barplots for each year, but now I am stuck on assigning each party its color from the vector "col."</p>