[R] R] highlight an area below a line
georg.otto at tuebingen.mpg.de
Mon Mar 20 18:52:11 CET 2006
Thanks a lot for your help!
Now I have a related problem, that I still can not solve:
I plot a t distribution using:
curve(dt(x, df = 20), xlim=c(-5,5))
The upper 5% of that distribution using:
qt(0.05, df=20, lower.tail=FALSE)
How can define the polygon to highlight the area representing the
upper 5% of values?
Thanks a lot!
"Ken Knoblauch" <knoblauch at lyon.inserm.fr> writes:
> How about,
> wvs <- which(d$x > 1 & d$x < 2)
> polygon(d$x[c( wvs, wvs, wvs[length(wvs)] ) ], c(0, d$y[wvs], 0), col =
> Georg Otto a écrit:
> if I plot a normal distribution like this:
> 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.
More information about the R-help