title: Changing the colour of the bars in a ggplot bar graph in R
body: <p>I am trying to change my bar graphs to these colours: &quot;#dda832&quot; &quot;#165e70&quot; &quot;#d5927c&quot; &quot;#4f9694&quot; but for some reason it doesn't work when I use <code>scale_fill_manual(values=c(&quot;#dda832&quot; &quot;#165e70&quot; &quot;#d5927c&quot; &quot;#4f9694&quot;))</code>. I think it is because I am using &quot;mean&quot; instead of &quot;identity&quot;. Does anyone know how to change this? :)</p>
  <p>My data is as follows:</p>
  <pre><code>structure(list(`video number` = 1:40, category = c(&quot;neutral&quot;, 
  &quot;neutral&quot;, &quot;neutral&quot;, &quot;neutral&quot;, &quot;neutral&quot;, &quot;neutral&quot;, &quot;neutral&quot;, 
  &quot;neutral&quot;, &quot;neutral&quot;, &quot;neutral&quot;, &quot;pleasant&quot;, &quot;pleasant&quot;, &quot;pleasant&quot;, 
  &quot;pleasant&quot;, &quot;pleasant&quot;, &quot;pleasant&quot;, &quot;pleasant&quot;, &quot;pleasant&quot;, &quot;pleasant&quot;, 
  &quot;pleasant&quot;, &quot;unpleasant&quot;, &quot;unpleasant&quot;, &quot;unpleasant&quot;, &quot;unpleasant&quot;, 
  &quot;unpleasant&quot;, &quot;unpleasant&quot;, &quot;unpleasant&quot;, &quot;unpleasant&quot;, &quot;unpleasant&quot;, 
  &quot;unpleasant&quot;, &quot;painful&quot;, &quot;painful&quot;, &quot;painful&quot;, &quot;painful&quot;, &quot;painful&quot;, 
  &quot;painful&quot;, &quot;painful&quot;, &quot;painful&quot;, &quot;painful&quot;, &quot;painful&quot;), frequency = c(55, 
  56, 90, 104, 47, 38, 48, 52, 43, 38, 162, 139, 137, 131, 143, 
  177, 151, 117, 164, 82, 116, 75, 105, 67, 75, 61, 133, 109, 123, 
  150, 196, 191, 182, 141, 151, 148, 181, 77, 134, 128), intensity = c(2.8, 
  2.7, 3.2, 3.2, 3.5, 2.6, 3.2, 2.9, 3.4, 2.8, 3.6, 3.6, 3.7, 3.5, 
  3.7, 3.9, 3.6, 3.6, 3.6, 3.4, 3.8, 3.2, 3.7, 3.7, 3.3, 3.6, 4.4, 
  3.7, 3.8, 4.2, 5, 4.8, 4.4, 4, 4.1, 3.9, 4.8, 3.7, 4, 4), threat = c(&quot;1.4&quot;, 
  &quot;1.5&quot;, &quot;1.6&quot;, &quot;1.5&quot;, &quot;1.9&quot;, &quot;1.4&quot;, &quot;1.8&quot;, &quot;1.8&quot;, &quot;1.3&quot;, &quot;1.5&quot;, 
  &quot;1.3&quot;, &quot;1.2&quot;, &quot;1.3&quot;, &quot;1.2&quot;, &quot;1.2&quot;, &quot;1.5&quot;, &quot;1.5&quot;, &quot;1.4&quot;, &quot;1.5&quot;, 
  &quot;1.2&quot;, &quot;5.6&quot;, &quot;3.2&quot;, &quot;5.2&quot;, &quot;2.9&quot;, &quot;4.0&quot;, &quot;3.4&quot;, &quot;5.6&quot;, &quot;3.5&quot;, 
  &quot;5.5&quot;, &quot;6.6&quot;, &quot;8.0&quot;, &quot;7.8&quot;, &quot;7.1&quot;, &quot;4.5&quot;, &quot;6.3&quot;, &quot;6.7&quot;, &quot;6.2&quot;, 
  &quot;5.0&quot;, &quot;6.5&quot;, &quot;5.4&quot;), arousal = c(&quot;1.7&quot;, &quot;1.9&quot;, &quot;2.2&quot;, &quot;2.1&quot;, 
  &quot;1.8&quot;, &quot;2.0&quot;, &quot;2.0&quot;, &quot;2.3&quot;, &quot;2.2&quot;, &quot;2.0&quot;, &quot;5.3&quot;, &quot;4.8&quot;, &quot;4.5&quot;, 
  &quot;3.9&quot;, &quot;4.0&quot;, &quot;4.5&quot;, &quot;4.6&quot;, &quot;3.3&quot;, &quot;4.2&quot;, &quot;3.2&quot;, &quot;4.7&quot;, &quot;3.2&quot;, 
  &quot;4.2&quot;, &quot;3.0&quot;, &quot;3.4&quot;, &quot;3.1&quot;, &quot;5.2&quot;, &quot;3.8&quot;, &quot;4.4&quot;, &quot;5.3&quot;, &quot;6.6&quot;, 
  &quot;6.2&quot;, &quot;6.0&quot;, &quot;4.9&quot;, &quot;5.2&quot;, &quot;6.5&quot;, &quot;4.8&quot;, &quot;4.0&quot;, &quot;5.1&quot;, &quot;4.6&quot;
  )), row.names = c(NA, -40L), class = &quot;data.frame&quot;)
  </code></pre>
  <pre><code>intensity_plot&lt;- ggplot(freq_intensity, aes(x= reorder (category, -intensity), y=intensity))+
    stat_summary(fun.y=&quot;mean&quot;, geom=&quot;bar&quot;) +
    stat_summary(fun.data = mean_cl_normal, fun.args = list(mult=1), geom = &quot;errorbar&quot;, width=0.3, size=0.7) +
    geom_jitter(colour=&quot;limegreen&quot;,shape=16,size=1, position=position_jitter(0.2))+
    #facet_wrap(~groups_all)+
    ggtitle(&quot;&quot;) +
    xlab(&quot;&quot;) + ylab(&quot;Mean intensity&quot;) +
    theme_bw(base_size = 10) +
    theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
    panel.border = element_blank(),
    axis.line = element_line())
  
  print(intensity_plot)
  </code></pre>