linesTorus {sdetorus} | R Documentation |
Lines and arrows with wrapping in the torus
Description
Joins the corresponding points with line segments or arrows that
exhibit wrapping in [-\pi,\pi)
in the horizontal and vertical axes.
Usage
linesTorus(x, y, col = 1, lty = 1, ltyCross = lty, arrows = FALSE, ...)
Arguments
x |
vector with horizontal coordinates, wrapped in |
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
x
and y
are wrapped to [-\pi,\pi)
before
plotting.
Value
Nothing. The functions are called for drawing wrapped lines.
Examples
x <- toPiInt(rnorm(50, mean = seq(-pi, pi, l = 50), sd = 0.5))
y <- toPiInt(x + rnorm(50, mean = seq(-pi, pi, l = 50), sd = 0.5))
plot(x, y, xlim = c(-pi, pi), ylim = c(-pi, pi), col = rainbow(length(x)),
pch = 19)
linesTorus(x = x, y = y, col = rainbow(length(x)), ltyCross = 2)
plot(x, y, xlim = c(-pi, pi), ylim = c(-pi, pi), col = rainbow(length(x)),
pch = 19)
linesTorus(x = x, y = y, col = rainbow(length(x)), arrows = TRUE)
[Package sdetorus version 0.1.10 Index]