Hi r-help-boun...@r-project.org napsal dne 23.09.2010 15:10:04:
> Hi group, > > I am currently plotting two densities using the following code: > > x1 <- c(1,2,1,3,5,6,6,7,7,8) > x2 <- c(1,2,1,3,5,6,5,7) > plot(density(x1, na.rm = TRUE)) > polygon(density(x2, na.rm = TRUE), border="blue") > > However, I would like to avoid bordering the second density as it adds > a nasty bottom line which I would like to avoid. > I would also rather have a dashed or dotted line for the second > (currently blue) density but without the bottom part. > Any idea how to do that? Something like lines(density(x2, na.rm = TRUE), col="blue") Regards Petr > > Best, > Ralf > > ______________________________________________ > 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. ______________________________________________ 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.