[R] shading an area of a graphic

Dennis Fisher fisher at plessthan.com
Wed Mar 24 20:23:18 CET 2010


Colleagues

OS 10.5
R: 2.10.1

I have a simple x-y plot for which I would like to shade the lower (or upper) part of the interior region (i.e., the area bounded by the axes).  If the delineation between top and bottom were linear, it would be use to use the polygon function.  However, the delineation is a curve (which I can describe by an equation).  In theory, I could divide the x-axis into a large number of regions, then draw a series of polygons side by side, the top / bottom borders of which are lines.  Is there a more elegant solution?

Dennis  


Dennis Fisher MD
P < (The "P Less Than" Company)
Phone: 1-866-PLessThan (1-866-753-7784)
Fax: 1-866-PLessThan (1-866-753-7784)
www.PLessThan.com



More information about the R-help mailing list