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?

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.

Reply via email to