On 24/05/2009 2:50 PM, Tom H wrote:
On Sun, 2009-05-24 at 19:32 +0100, Tom H wrote:
polygon(
c(from, x, to),
c(min(y),y,min(y)),
col=areacol, lty=0
)
I guess my question should have been, I don't seem to be able to query
or "reflect" a plot object to get at its attributes to fill in the
polygon call, without actually modifying the curve/plot function.
There isn't an easy way to get what you want. Modifying curve() to
return the x and y vectors seems like a reasonable thing to do; I'll
take a look at that. Then your areacurve() wouldn't need to reproduce
all of curve().
Duncan Murdoch
______________________________________________
R-help@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.