[R] polygon
mike.campana@freesurf.ch
mike.campana at freesurf.ch
Tue Apr 20 21:04:18 CEST 2004
Dear all
I try once again.
In order to clearly mark values wich are larger than a treshold value, I
would like to color the surface below the line given by plot (yy~xx). To
color is only the surface between abline (treshold) and yy if they are
larger than the specific limit. I guess I can use the function polygon,
but I can not find any valuable solution.
I'm grateful to you for an advice, an example or a link.
Mike
xx <- c(1:100)
yy <- rnorm(100)
plot (yy~xx,type="l")
abline (h=0.5,col="red")
#?? how can I use polygon()
#in order to color surface below yy value and > abline??
polygon(xx,yy,col="gray")
---
---
---
---
More information about the R-help
mailing list