[R] highlight an area below a line

Georg Otto georg.otto at tuebingen.mpg.de
Tue Mar 14 23:21:30 CET 2006


Hi,

if I plot a normal distribution like this:

d<-density(rnorm(10000))
plot(d)

how can I highlight the area below the graph in a certain interval,
say x=1,2?  I understand that I should use polygon, but I have not
found the right way to give the result that I want.

Thanks a lot!

Georg




More information about the R-help mailing list