title: Adding a line on a graph in r
body: <p>Based on the following data, I want to plot</p>
  
  <pre><code>m &lt;- 10000
  x &lt;- runif(m,-1,1)
  a0 &lt;- 0; a1 &lt;- -4.46; a2 &lt;- 1.6; a3 &lt;- -4.63
  </code></pre>
  
  <p>two variables <code>p1.at.x</code> and <code>p0.at.x</code>, defined below, against <code>x</code>.</p>
  
  <pre><code>p0.at.x &lt;- numeric(0) 
  p1.at.x &lt;- numeric(0)               
  for(i in 1:m) {
    p0.at.x[i] &lt;- a0 +(a1*x[i]) + (a2*((1.5*(x[i]**2))-0.5)) + (a3*((2.5*(x[i]**3))-(1.5*x[i])))
    p1.at.x[i] &lt;- 16 -(40.4*x[i]) + (31*((1.5*(x[i]** 2))-0.5 ))-(18.3*((2.5*(x[i]**3))-(1.5*x[i])))
  }
  </code></pre>
  
  <p>I tried with the following: </p>
  
  <pre><code>plot(x, p1.at.x, col="red")        
  lines(x, p0.at.x, col="blue")
  </code></pre>
  
  <p>but I could not see the line for <code>p0.at.x</code> on the graph. When I plot them individually, they have a similar shape, only differ in range. May somebody suggest me what went wrong?</p>