Re: [R] Plot 2 ecdf in one graph

2009-09-06 Thread Rolf Turner
Two things: (1) type="l" won't work; plot.ecdf() calls plot.stepfun() and it doesn't have a ``type'' argument. (2) Giving plot two separate objects to plot makes no sense at all. (3) If you've got ***frequency*** data then ecdf() is probably not the right thing to do in the first pla

[R] Plot 2 ecdf in one graph

2009-09-06 Thread Roslina Zakaria
Hi r-users,   I would like to compare the cdf between historical and predicted. My x.obs and x.pre are the frequency data in classes of 0-300. I tried: plot(ecdf(x.obs),ecdf(x.pre),type="l",col="red")   and it gives me: Error in plot.stepfun(x, ..., ylab = ylab, verticals = verticals, pch = pch)