| linesCirc {sdetorus} | R Documentation | 
Lines and arrows with vertical wrapping
Description
Joins the corresponding points with line segments or arrows that
exhibit wrapping in [-\pi,\pi) in the vertical axis.
Usage
linesCirc(x = seq_along(y), y, col = 1, lty = 1, ltyCross = lty,
  arrows = FALSE, ...)
Arguments
x | 
 vector with horizontal coordinates.  | 
y | 
 vector with vertical coordinates, wrapped in   | 
col | 
 color vector of length   | 
lty | 
 line type as in   | 
ltyCross | 
 specific line type for crossing segments.  | 
arrows | 
 flag for drawing arrows instead of line segments.  | 
... | 
Details
y is wrapped to [-\pi,\pi) before plotting.
Value
Nothing. The functions are called for drawing wrapped lines.
Examples
x <- 1:100
y <- toPiInt(pi * cos(2 * pi * x / 100) + 0.5 * runif(50, -pi, pi))
plot(x, y, ylim = c(-pi, pi))
linesCirc(x = x, y = y, col = rainbow(length(x)), ltyCross = 2)
plot(x, y, ylim = c(-pi, pi))
linesCirc(x = x, y = y, col = rainbow(length(x)), arrows = TRUE)
[Package sdetorus version 0.1.10 Index]