Draw a filled polygon as a step function
Usage
polygon.step(x, y1, y2, border = FALSE, ...)
Arguments
- x
x coordinates; must be one longer than y1
and y2
- y1
lower y coordinates
- y2
upper y coordinates
- border
Color to draw the border; see polygon()
. Default: no borders.
- ...
Additional arguments to be passed to polygon()
Examples
plot(1:10, 1:10, type='n', ylim=c(0,12))
polygon.step(1:10, 0:8, 2:10, col='gray')
lines(1:10, 1:10, type='s')