powered by
Draw a closed polygon delineated by an 'upper' and 'lower' y limit.
drawpoly(x, upper, lower, ...)
The x values of the polygon
The upper 'edge' of the polygon
The lower 'edge' of the polygon
Other arguments passed to polygon
polygon
Daniel Pritchard
drawpoly is a generic method for drawing polygons where the polygon is drawn as:
drawpoly
polygon(x=c(x, rev(x), x[1]), y=c(upper, rev(lower), upper[1])
i.e. a line following along the top edge (left-to-right along x) and back along the bottom edge (right-to-left along x).
x
The specific method implemented here for FRAIR is drawpoly.frboot.
drawpoly.frboot
datx <- 1:6 upper <- datx*1.2 lower <- datx*0.8 plot(datx, datx, type='n', ylim=c(0,10), xlab='X', ylab='Y') drawpoly(datx, upper, lower, col=2) points(datx, datx, pch=20)
Run the code above in your browser using DataLab