title: Making a stacked area plot using ggplot2
body: <p>I'm using the following data structure to try and make a stacked area chart:</p>
  
  <pre><code>df &lt;- data.frame(PopDen = c( 0.002279892, 0.002885407, 0.004291351, 0.002457731, 0.006631572, 0.007578882, 0.004465446, 0.007436628, 0.009001456, 0.006951703, 0.003602076, 0.005695585, 0.005819783, 0.007412274, 0.004931548, 0.006257411, 0.008635908, 0.005438558, 0.002251421,0.006438558), DomArea = c( 253500, 135270, 197180, 131590, 142210, 166920, 125640, 184600, 139940, 126280, 127760, 190940, 133440, 143510, 117260, 69340, 143620, 127480, 181970,164180), PR_Cat = c( "High", "High", "Low", "Low", "Low", "Low", "Low", "Low", "High", "High", "Medium", "Medium", "Medium", "Low", "Low", "Medium", "Medium", "Low", "Low","Low") )
  
  p &lt;- ggplot(df, aes(PopDen, order(DomArea), colour = PR_Cat))  
  p + geom_area(aes(colour = PR_Cat, fill= PR_Cat), position = 'stack')
  </code></pre>
  
  <p>However, I don't understand how to stack the areas on top of each other; at the moment they are overlapping. I assume that I need a <code>position = 'stack'</code> argument here, but the plot looks the same whether it is included or not.</p>
  
  <p>Also, is it possible to order <code>DomArea</code> by one of the categories in <code>PR_Cat</code>or would I need to reorganize my data?</p>