Hi,
 
I would like to distinguish my plots using colors but I got error message.  How do I correct that?
 
 
plot(ecdf(z), main ="CDF for observed and simulated weighted sum",type="l",lwd=2,col="blue",
xlab="Weighted sum (mm)", ylab="Cumulative Percent", xlim=c(0,15), xaxs ='i', yaxs ='i',ylim=c(0,1))
par(new=TRUE)
plot(gen[,1],gen[,2],type="l",lwd=2,ann=FALSE,axes=FALSE, col="red",xlim=c(0,15),ylim=c(0,1),xaxs ='i', yaxs ='i')
legend(10,.2,c("obs","pre"),col=c("blue","red"),lwd=c(1,2))

> plot(ecdf(z), main ="CDF for observed and simulated weighted sum",type="l",lwd=2,
+ xlab="Weighted sum (mm)", ylab="Cumulative Percent", xlim=c(0,15), xaxs ='i', yaxs ='i',ylim=c(0,1))
Error in plot.default(0, 0, type = "n", xlim = xlim, ylim = ylim, xlab = xlab,  : 
  formal argument "type" matched by multiple actual arguments
 
Thank you.



      
	[[alternative HTML version deleted]]

