title: Combine functions in ggplot2
body: <p>I am aiming to plot a quadratic function with s-curve in ggplot2 as in the image <a href="https://i.stack.imgur.com/dwQ7O.jpg" rel="nofollow noreferrer">HERE</a></p>
  
  <p>This is what I get so far but the lines do not line up!My gues is it has to do with seq(0,2). Thanks so much for your comments!</p>
  
  <pre><code>     ggplot(data.frame(x = seq(0, 2)), aes(x)) + 
  stat_function(fun=function(x)x^2, geom="line")
        stat_function(fun = function(x) 1/(1 + exp(-x)), geom = "line")
  </code></pre>