[R] area between two curves, but one is not continuous
axmeyer at googlemail.com
Thu Sep 7 18:49:06 CEST 2006
I want to colorize the area between two curves, but one of these
curves isn't continuous.
The best solution I found is the 2nd example in the help of polygon,
but how can I get no area filling for the missing data in the 2nd curve.
x1 = c(1:8)
x2 = c(1:8)
y1 = c(1,5,6,1,4,5,5,5)
y2 = c(0,3,3,NA,NA,1,3,4)
for the missing parts I want no filling.
so for this examples the code would be:
How can I generalize this for a longer curve with more data?
More information about the R-help