title: R - ggplot2 : the position for the geom_text doesn't work
body: <p>i searched on this website to find a solution, but i've found nothing.</p>
  
  <p>Here is the problem :</p>
  
  <p>I try to fix the position of labels in a barplot, with geom_text and the function "y". But even if i change the value of "y", the position doesn't change, it stays at the middle of the bottom line of the barplot.</p>
  
  <p>So i tried with "vjust", it works but the position is determined from the distance with the top of the bars, so since my bars don't have the same height, the labels don't have the same position. I would prefer to align them, and the function "y" provides that.</p>
  
  <p><a href="https://i.stack.imgur.com/c2i8Y.png" rel="nofollow noreferrer">Here is the plot</a></p>
  
  <p>Here is my data example :</p>
  
  <pre><code>Phoneme CoG
  s   6112
  s   5946
  s   6545
  s   6097
  s   6245
  s   5604
  s   6189
  s   6030
  s   5386
  s   6105
  s'  5546
  s'  6212
  s'  5963
  s'  5774
  s'  6213
  s'  6118
  s'  5837
  s'  5072
  s'  4642
  s'  4988
  </code></pre>
  
  <p>here is the code :</p>
  
  <pre><code>ggplot(data=donnees_M, aes(x=Phoneme, y=CoG, fill=Phoneme)) +    
  geom_bar(position=position_dodge(), colour="black", stat="identity") +    
  geom_errorbar(aes(ymin=CoG-ci, ymax=CoG+ci), width=.2,position=position_dodge(.9)) +    
  labs(x=NULL, y="Centre of Gravity") + theme(panel.background = element_rect(fill = "white")
  , panel.grid.minor=element_line(color = "grey30"), panel.grid.major =element_line(color = "grey30")) +
  scale_fill_manual(values=c("deepskyblue3","seagreen4")) +     
  geom_text(aes(y=5.5, label=format(donnees_M$CoG,digits=0)), size = 10) +     
  guides(fill=F) +     
  theme(axis.title.y = element_text(size = rel(2), angle = 90)) + ylim(0,6000) +     
  theme(axis.text.x = element_text(size = rel(3), color="black")) +     
  theme(axis.text.y = element_text(size = rel(2.8), color="black"))
  </code></pre>
  
  <p>It's strange because i already used that function in the past and it worked without any problem. And nothing has changed from the previous script, except my datas.</p>
  
  <p>Do you have any idea of the problem?</p>
  
  <p>Tell me if you need more informations from my script and my data</p>
  
  <p>Thanks by advance</p>