Hello,
is ot possible to draw two ecdf of vectors (say s1 and s2) on the same
figire with R.
plot function draws a new plot and there is no function like points or lines
to draw a second ecdf on the figure.
Regards
--
*PhD candidate in Computer Science
Address
3 avenue lamine, cité ezzahra,
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 adel.s...@imag.fr wrote:
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
may
3 matches
Mail list logo