title: Plot two graphs in same plot in R
body: <p>I would like to plot y1 and y2 in the same plot.</p>
  
  <pre><code>x  &lt;- seq(-2, 2, 0.05)
  y1 &lt;- pnorm(x)
  y2 &lt;- pnorm(x, 1, 1)
  plot(x, y1, type = "l", col = "red")
  plot(x, y2, type = "l", col = "green")
  </code></pre>
  
  <p>But when I do it like this, they are not plotted in the same plot together.</p>
  
  <p>In Matlab one can do <code>hold on</code>, but does anyone know how to do this in R?</p>