title: Filling under the a curve with ggplot graphs
body: <p>I would like to create a graph with the normal function from x=-2 to x=2 filled under the curve from -2 to 0.
  I've tried with ggplot2</p>
  
  <pre><code>qplot(c(-2, 2), stat="function", fun=dnorm, geom="line") +
  + geom_area(aes(xlim=c(-2,0)),stat="function", fun=dnorm)
  </code></pre>
  
  <p>But I get this graph completely filled instead (the black colour) 
  <a href="https://i.stack.imgur.com/U6upX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/U6upX.png" alt="enter image description here"></a></p>
  
  <p>How can I get a plot filled only from -2 to 0?</p>
  
  <p>Other options or packages are welcome.</p>
  
  <p>I've also tried with only one command with ggplot and filled option but I can't get it either.<br>
  I know some people does it using polygons but the result is not so soft and nice. </p>
  
  <p>PD: I repeat, the solution I'm looking for involves not generating x,y coordinates beforehand but using directly the function with    stat="function", fun=dnorm  or similar.  Thus, my question is not a duplicate.</p>
  
  <p>I've also tried </p>
  
  <pre><code>ggplot(NULL,aes(x=c(-2,2))) +  geom_area(aes(x=c(-2,0)),stat="function", fun=dnorm, fill="red") +
  geom_area(aes(x=c(0,2)),stat="function", fun=dnorm, fill="blue")  
  </code></pre>
  
  <p>But again it fills all the curve with a single color, blue. The red half seems to be overwritten. The same with geom_ribbon and other options.</p>