Re: [R] Shade area under curve

2010-03-10 Thread Paul Johnson
I use this to make illustration for some calculus notes. There are examples of shaded areas in there: ### Filename: Normal1_2009_plotmathExample.R ### Paul Johnson June 3, 2009 ### This code should be available somewhere in http://pj.freefaculty.org/R. If it is not ### email me ###Set mu and s

Re: [R] Shade area under curve

2010-03-10 Thread S Ellison
see http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=7 for an example that may help. >>> claytonmccandless 03/09/10 6:48 PM >>> 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? Th

Re: [R] Shade area under curve

2010-03-09 Thread Stephan Kolassa
Hi, use dnorm() for the density and polygon() to shade the area underneath, with suitably many x values so your density looks smooth. HTH, Stephan 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.