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

From: Charles Annis, P.E. <Charles.Annis_at_statisticalengineering.com>
Date: Thu, 13 Sep 2007 09:27:53 -0400

While it's true that polygon() is the function you need, perhaps it would be helpful to see an example of how to use polygon().

Go here: http://addictedtor.free.fr/graphiques/thumbs.php

Put the mouse over the thumbnail plots to see larger pictures and look for something useful. You will find it here: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=88

The code for this graph is downloadable too. Just click on the icon on the left of the screen.

Best wishes!

Charles Annis, P.E.

Charles.Annis_at_StatisticalEngineering.com phone: 561-352-9699
eFax: 614-455-3265
http://www.StatisticalEngineering.com  

-----Original Message-----
From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of gallon li
Sent: Thursday, September 13, 2007 6:52 AM 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.

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. Received on Thu 13 Sep 2007 - 13:33:50 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 13 Sep 2007 - 16:34:58 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.