Skip to content

Plot 2 ecdf in one graph

2 messages · Roslina Zakaria, 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 place.

(4) I can't count.

To get the ***plots** you want, do something like:

	plot(ecdf(x.pre),do.points=FALSE,col="red",xlim=range(x.pre,x.obs))
	plot(ecdf(x.obs),do.points=FALSE,col="blue",add=TRUE)

But as I said if x.obs and x.pre are counts, rather than the raw  
data, this
does not appear to make any sense.  You are getting the ecdf-s of the  
counts
rather than of the raw data which is a toadally different story.  And  
toadally
misleading.  Re-think.

	cheers,

		Rolf Turner
On 7/09/2009, at 1:52 PM, Roslina Zakaria wrote:

            
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}