Re: [R] two ecdf in the same figure

2011-09-24 Thread Joshua Wiley
Or just ask let the second plot know to add it to the existing plot: set.seed(2) plot(ecdf(rnorm(50))) plot(ecdf(rnorm(50,,2)), add = TRUE, pch = 2) legend(-2.9, .95, legend = c("First ECDF", "Second ECDF"), pch = c(16, 2)) note the limits are set by the first plot, so watch out for that. You ma

Re: [R] two ecdf in the same figure

2011-09-24 Thread R. Michael Weylandt
What version of R are you using? x = ecdf(rnorm(50)); y = ecdf(rnorm(50)) plot(x); lines(y, col=2) works for me on R 2.13.1. Specifically, there is a lines.stepfun method (albeit non-visible) which handles this. Michael On Sat, Sep 24, 2011 at 12:23 PM, Adel ESSAFI wrote: > Hello, > > is ot