[R] how to plot shaded area under a curve?

Wayne.W.Jones at shell.com Wayne.W.Jones at shell.com
Thu Sep 13 13:13:55 CEST 2007




?polygon


-----Original Message-----
From: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org]On Behalf Of gallon li
Sent: 13 September 2007 11:52
To: r-help
Subject: [R] how to plot shaded area under a curve?


say, I am plotting

x=seq(0,5,len=100)
y=-(x-5)^2

plot(x,y)

how can I put some color or verticle lines below the plotted curve?

	[[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list