title: ggplot - Plotting several sin functions on one graph
body: <p>I want to show graphically how the summation of two different sin curves looks like. 
  So, I am trying to make a single graph that shows two different sin function and their sum. So, three curves on one graph. </p>
  
  <p>How can I do it with ggplot layers? </p>
  
  <p>I am defing two sin functions (y and z)</p>
  
  <pre><code>x &lt;- seq(0, 16*pi, 0.01)
  y &lt;- 2*sin(3*(x-1))
  z &lt;- sin(x)
  </code></pre>
  
  <p>summing up the two curves:</p>
  
  <pre><code>t &lt;- y + z
  </code></pre>
  
  <p>I can see the three separately with:</p>
  
  <pre><code>plot(x,y,type="l")
  plot(x,z,type="l")
  plot(x,t,type="l")
  </code></pre>
  
  <p>But how can I plot the three functions?</p>
  
  <p>I tried this but it does not work</p>
  
  <pre><code>ggplot(x,
         qplot(y,x,geom="path", xlab="time", ylab="Sine wave") +
         qplot(z,x,geom="path", xlab="time", ylab="Sine wave"))
  </code></pre>