Add lines to a track
spiral_lines(
x,
y,
type = "l",
gp = gpar(),
baseline = "bottom",
area = FALSE,
track_index = current_track_index()
)
X-locations of the data points.
Y-locations of the data points.
Type of the line. Value should be one of "l" and "h". When the value is "h", vertical lines (or radial lines if you consider the polar coordinates) relative to the baseline will be drawn.
Graphical parameters.
Baseline used when type
is "l"
or area
is TRUE
.
Whether to draw the area under the lines? Note gpar(fill = ...)
controls the filled colors of the areas.
Index of the track.
No value is returned.
x = sort(runif(1000))
y = runif(1000)
spiral_initialize()
spiral_track()
spiral_lines(x, y)
spiral_initialize()
spiral_track()
spiral_lines(x, y, type = "h")
spiral_initialize()
spiral_track()
spiral_lines(x, y, area = TRUE, gp = gpar(fill = "red", col = NA))