arcs | R Documentation |
Low level plotting of great circle arcs with lines
arcs(x, ...)
## S4 method for signature 'matrix'
arcs(x, breaks = 100, breakAtDateline = TRUE, plot = TRUE, ...)
x |
A matrix of longitude and latitude points (WGS 84 longlat) |
... |
Arguments passed to lines (par) |
breaks |
the number of points inserted between every points to draw great circle arcs. |
breakAtDateline |
Logical to indicate whether the lines are to be broken at the dateline. |
plot |
Logical value whether the plotting should be done at all (in case returned values are needed). |
Invisible return of a matrix of coordinates. If breakAtDateline = TRUE
, then NA
missing values
will be inserted between coordinates where the lines cross the dateline.
# generate random points
set.seed(0)
example <- rpsphere(10, output="polar")
# plotting
plot(NULL, NULL, xlim=c(-180, 180), ylim=c(-90,90))
points(example)
text(label=1:nrow(example), example, pos=2)
arcs(example, col="red", breaks=200)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.