Does not work for me with rnorm(20) as an argument. (And supplying a
dummy value for DIM.) The error after fixing the missing DIM issue was:
Error in plot.stepfun(x, ..., ylab = ylab, verticals = verticals, pch
= pch) :
argument 4 matches multiple formal arguments
The help page for plot.ecdf refers me to plot.stepfun (and the error
message did too) which does not have a col= argument but rather
col.hor= and col.vert= . Using those arguments instead of col="red",
it now "works".
plot(
ecdf(rnorm(20)),
do.points=FALSE,
verticals=TRUE,
main=paste("Ecdf of distances "),
col.hor="red", col.vert="red"
)
On Mac OS X 10.5.7, 64bit R 2.8.1
On Jul 3, 2009, at 12:24 PM, Uwe Ligges wrote:
Lars Bergemann wrote:
Hi.
I have the following two ecdf plots in one graph:
plot(
ecdf(....),
do.points=FALSE,
verticals=TRUE,
main=paste("Ecdf of distances ",DIM,sep=""),
col="red"
);
lines(
ecdf(....),
do.points=FALSE,
verticals=TRUE
);
How do I change the color of the resulting graph? Adding col="red"
to either plot or lines results in an error ...
... but works for me.
Hence please specify your version of R, OS, exactly reproducible
code (above the argument to ecdf are missing, obviously).
Best,
Uwe Ligges
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.