spiral_lines: Add lines to a track

View source: R/graphics.R

spiral_linesR Documentation

Add lines to a track

Description

Add lines to a track

Usage

spiral_lines(
  x,
  y,
  type = "l",
  gp = gpar(),
  baseline = "bottom",
  area = FALSE,
  track_index = current_track_index()
)

Arguments

x

X-locations of the data points.

y

Y-locations of the data points.

type

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.

gp

Graphical parameters.

baseline

Baseline used when type is "l" or area is TRUE.

area

Whether to draw the area under the lines? Note gpar(fill = ...) controls the filled colors of the areas.

track_index

Index of the track.

Value

No value is returned.

Examples

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))

spiralize documentation built on June 22, 2024, 10:45 a.m.