On Thu, 2007-01-25 at 10:18 -0300, Mauricio Cardeal wrote: > Please, how to fill the area under the curve? > > x <- c(1:10) > y <- c(rnorm(10)) > plot(x,y) > lines(x,y) > > Thanks, > Mauricio Cardeal
See ?polygon x <- 1:10 y <- rnorm(10) plot(x,y, type = "o") polygon(c(min(x), x, max(x)), c(min(y), y, min(y)), col = "blue") HTH, Marc Schwartz ______________________________________________ [email protected] 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.
