[R] Shade area under curve?

Robert Lundqvist Robert.Lundqvist at ies.luth.se
Wed Jan 30 16:20:46 CET 2002


Hi all,

I've got this graphics question which really should be easy. I want to shade
an area between bounds under a curve. A suitable beginning seems to be the
following:

> plot(dnorm,-4,4)
> segments(-4,0,4,0)
> segments(-2,0,-2,dnorm(-2))
> segments(2,0,2,dnorm(2))

It is the area between -2 and 2 which I want to shade (or something
similar). Hints anyone?

Robert
****************
Robert Lundqvist
Dept of Quality Technology & Statistics
Lulea University of Technology
Sweden
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list