[R] lines, ecdf and colors
eric lee
ericlee100 at gmail.com
Sat Nov 8 19:39:16 CET 2008
Hi. I'm trying to plot two ecdf's on the same graph using two
different colors. I can plot using the same color, but it doesn't
work when I change colors? Any suggestions? Thanks in advance for
your help.
x <- c(0.80, 0.83, 1.89, 1.04, 1.45, 1.38, 1.91, 1.64, 0.73, 1.46)
y <- c(1.15, 0.88, 0.90, 0.74, 1.21)
plot(ecdf(x))
# it works without col='blue', but doesn't with it
lines(ecdf(y), col = "blue")
More information about the R-help
mailing list