title: How can I adjust the axes to start from zero origin in r plot
body: <p>To plot the empirical cumulative density of three variables, x1, x2 and x3, I used the following in r: </p>
  
  <pre><code>plot.ecdf(x1, col="blue",
       main="Distribution XYZ",
       xlab="x_i", ylab="Prob(x_i&lt;=y)")
  
  lines(ecdf(x2), col="red")    # adds a line
  lines(ecdf(x3), col="green")  # adds line
  legend(600,0.6, # places a legend from (x,y)=(600,0.6) on
         c("x1","x2","x3"), # puts text in the legend
         lty=c(1,1,1), # gives the legend appropriate symbols (lines)
         lwd=c(1,1,1),col=c("blue","red","green")) # gives the legend lines the correct color and width
  </code></pre>
  
  <p>The resulting plot however has two horizontal lines (broken lines) at 0 and 1 besides the box. And, the origin of the box has a space below zero on the vertical axis and a space to the left of zero on the horizontal axis. May you suggest how to remove these space and the additional lines. I wanted but could not post the plot. </p>
  
  <p>EDITED:
  A sample data can be generated as follows:</p>
  
  <h1>sample data</h1>
  
  <pre><code>n &lt;- 1000; u &lt;- runif(n)
  a &lt;- -4.46; b &lt;- 1.6; c &lt;- -4.63
  d &lt;- ( a * u ) + (b * ( ( 1.5 * ( u ** 2 )) - 0.5 ))  + (c * ( (2.5 * (u ** 3)) - (1.5 * u )))
  x1 &lt;- -126/d; x2 &lt;- -131/d; x3 &lt;- -187/d
  </code></pre>