title: R: ggplot2 geom_text by condition (for selected)
body: <p>I need to copy this bar chart
  <img src="https://i.stack.imgur.com/bFL73.png" alt="chart" /></p>
  <p>The problem is that I don't know how to make red and blue labels on the bars and save grey for others. According to the task red labels should highlight whether the character is included in Golden Trio (Harry, Hermione Granger, Ron Weasley). So their bars should contain this red label and others characters should have grey labels.</p>
  <p>My code is here:</p>
  <pre><code>
  ggplot(data = actions, aes(x = names_ordered, y = tot)) + geom_bar(stat = &quot;identity&quot;,color=&quot;grey85&quot;, fill=&quot;grey90&quot;) +
    labs(title = &quot;Character aggression \nHarry Potter Universe&quot;, caption = &quot;pmsar2020_hw1_shivarova&quot;) + theme_classic() + 
    geom_text(aes(label = tot), size = 3,  vjust = 2, colour = &quot;grey30&quot;) + theme(plot.title = element_text(hjust = 0.5),
                                                                                 plot.caption.position = &quot;plot&quot;,
                                                                                 plot.caption = element_text(hjust = 1,
                                                                                                             face = &quot;italic&quot;, 
                                                                                                             color = 'grey60'),
                                                                                 axis.title.x=element_blank(),
                                                                                 axis.title.y =element_blank()) 
  </code></pre>