title: Using a uniform color palette among different ggplot2 graphs with factor variable
body: <p>I am using ggplot2 to create several plots about the same data. In particular I am interested in plotting observations according to a factor variable with 6 levels ("cluster").</p>
  
  <p>But the plots produced by ggplot2 use different palettes every time!</p>
  
  <p>For example, if I make a bar plot with this formula I get this result (this palette is what I expect to obtain):</p>
  
  <pre><code>qplot(cluster, data = data, fill = cluster) + ggtitle("Clusters")
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/TkveJ.jpg" alt="Bar chart of the cluster variable"></p>
  
  <p>And if I make a scatter plot and I try to color the observations according to their belonging to a cluster I get this result (notice that the color palette is different):</p>
  
  <pre><code>ggplot(data, aes(liens_ratio,RT_ratio)) +
    geom_point(col=data$cluster, size=data$nombre_de_tweet/100+2) +
    geom_smooth() +
    ggtitle("Links - RTs")
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/hky1J.jpg" alt="Scatterplot with observations colored according to their cluster"></p>
  
  <p>Any idea on how to solve this issue?</p>