[R] Shade area under curve

Stephan Kolassa Stephan.Kolassa at gmx.de
Tue Mar 9 20:38:37 CET 2010


use dnorm() for the density and polygon() to shade the area underneath, 
with suitably many x values so your density looks smooth.


claytonmccandless schrieb:
> I want to shade the area under the curve of the standard normal density.
> Specifically color to the left of -2 and on. How might i go about doing
> this?
> Thanks

More information about the R-help mailing list