Skip to content

filling the area between two curves in a plot

1 message · Liaw, Andy

#
Assuming the coordinates for the two curves are x1, y1, x2 and y2, and that
the pairs are sorted by x1 and x2, respectively.  Then just do something
like:

polygon(c(x1, rev(x2)), c(y1, rev(y2), ...)

HTH,
Andy
------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments,...{{dropped}}