title: ggplot2 - piechart - value labels in reverse order
body: <p>I am trying to match labels with my pie chart with ggplot2:</p>
  
  <p>Code:</p>
  
  <pre><code>values=c(59,4,4,11,26)
  labels=c("catA", "catB","catC","catD","catE")
  pos = cumsum(values)- values/2
  graph &lt;- data.frame(values, labels,pos)
  
  categoriesName="Access"
  percent_str &lt;- paste(round(graph$values / sum(graph$values) * 100,1), "%", sep="")
  
  values &lt;- data.frame(val = graph$values, Type = graph$labels, percent=percent_str, pos = graph$pos )
  
  pie &lt;- ggplot(values, aes(x = "", y = val, fill = Type)) + 
    geom_bar(width = 1,stat="identity") + 
    geom_text(aes(x= "", y=pos, label = val), size=3) 
  pie + coord_polar(theta = "y")
  </code></pre>
  
  <p>Output:
  <a href="https://i.stack.imgur.com/5pYV2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5pYV2.png" alt="myoutput"></a></p>
  
  <p>I read these topics, but without any success:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/16184188/ggplot-facet-piechart-placing-text-in-the-middle-of-pie-chart-slices">ggplot, facet, piechart: placing text in the middle of pie chart slices</a></li>
  <li><a href="https://stackoverflow.com/questions/24803460/r-ggplot2-add-labels-on-facet-pie-chart">R + ggplot2 =&gt; add labels on facet pie chart</a></li>
  </ul>