title: ggplot2: How to add percentage or count labels on percentage bar plot? with non numeric data
body: <p>Sorry for my bad english skills. I will make many grammar ou spelling errors. I apologize for it.</p>
  
  <p>I have some non numeric data like :</p>
  
  <pre><code>#Used library
  library(ggplot2)
  library(scales)
  
  #Definition of data
  graph&lt;-cbind.data.frame(
      sample(c("FI", "FA","FC"), 100, replace = TRUE),
      sample(c("Rep","Dip"),100, replace=TRUE)
  )
  names(graph)&lt;- c("RegimeInscription","repondant")
  </code></pre>
  
  <p>I look after a graph like this :<a href="https://i.stack.imgur.com/PPVn9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PPVn9.png" alt="graph barplot position fill with percent value in bar"></a> from <a href="https://stackoverflow.com/questions/20011266/label-selected-percentage-values-inside-stacked-bar-plot-ggplot2">this question</a>
  I follow the explanation but it is not valid for discrete data on X axis.</p>
  
  <pre><code>#Some var
  theme_barre &lt;- theme_bw()+
    theme(
      panel.grid=element_blank(),
      plot.title=element_text(colour = 'red', size=10, face="bold", hjust = 0.5, vjust = 0.5),
      legend.text=element_text(size=9),
      legend.key.size = unit(2, "mm"),
      panel.background = element_rect(fill = "transparent",colour = NA), # or theme_blank()
      plot.background  = element_rect(fill = "transparent",colour = NA),
      panel.grid.minor = element_blank()#, 
      )
  texte &lt;- geom_text(
          #mapping = aes(y = (..count.. / sum(..count..))/ c(2, 1) , label = paste0(round(..count.. / sum(..count..) * 100), "%") ),
          mapping = aes(label = paste0(round(..count.. / sum(..count..) * 100), "%") ),
          stat = "count",
          na.rm=TRUE,
  )
  
  #Make the graph
      ggplot(graph, aes(x = factor(repondant),fill = factor(RegimeInscription) )) +#Initiation du graphique
      geom_bar(position = "fill") +#Realisation du graphique
      theme_barre + #fond blanc
      coord_flip()+ #barre horizontale
      scale_fill_discrete( name=" ", labels=c("FI"="Fi","FA"="Fa","FC"="Fc") )+
      labs(x=" ", y=" ")+
      scale_y_continuous(breaks=seq(0,1,0.1), labels=percent)+
      ggtitle("Régime d'inscription")+
      texte
  </code></pre>
  
  <p>I think the issue come from the texte value the comment with y=... is not a solution because I have many graph with the same value and different length.
  The graph are made automaticaly on different data so I can not specify some value.</p>
  
  <p>Many thanks</p>