title: ggplot2: geom_area with factorial x-axis
body: <p>I am trying to make a stacked area plot. My x-axis is age categories, but I want to connect them as a continuous scale.</p>
  
  <p>I have number of diagnoses on the y (filled by diagnosis) and age on the x.</p>
  
  <p>subset of data:</p>
  
  <pre><code>structure(list(diag = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 
  2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("Hjernerystelse", 
  "Lungesygdomme"), class = "factor"), age = structure(c(1L, 2L, 
  4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 3L, 12L, 13L, 14L, 15L, 16L, 
  17L, 18L, 19L, 1L, 2L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 3L, 
  12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L), .Label = c("0 år", "1-4 år", 
  "5-9 år", "10-14 år", "15-19 år", "20-24 år", "25-29 år", "30-34 år", 
  "35-39 år", "40-44 år", "45-49 år", "50-54 år", "55-59 år", "60-64 år", 
  "65-69 år", "70-74 år", "75-79 år", "80-84 år", "85- år"), class = "factor"), 
      n = c(15L, 89L, 87L, 71L, 46L, 32L, 26L, 24L, 32L, 40L, 74L, 
      55L, 39L, 19L, 38L, 27L, 24L, 14L, 23L, 291L, 2170L, 267L, 
      269L, 234L, 244L, 256L, 336L, 432L, 638L, 458L, 792L, 1010L, 
      1401L, 2088L, 2087L, 1815L, 1767L, 1995L)), row.names = c(NA, 
  -38L), .Names = c("diag", "age", "n"), class = c("tbl_df", "tbl", 
  "data.frame"))
  </code></pre>
  
  <p>The following gives a useful plot, but doesn't conserve the categories on the x-axis:</p>
  
  <pre><code>plot1 &lt;- ggplot(foo, aes(age, n)) +
          geom_area(aes(x=as.numeric(factor(age)), fill=diag))
  </code></pre>
  
  <p>Is there a simple way to use the geom_area on factorial data, or just a way to show the levels on the x-axis.</p>
  
  <p>An other problem is that by data have 29 different diagnoses giving this result:</p>
  
  <p><img src="https://i.stack.imgur.com/94doT.png" alt=""></p>