Learn R Programming

icosa (version 0.11.1)

arcs: Function to plot a set of great circle arcs between points

Description

Low level plotting of great circle arcs with lines

Usage

arcs(x, ...)

# S4 method for matrix arcs(x, breaks = 100, breakAtDateline = TRUE, plot = TRUE, ...)

Value

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.

Arguments

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

Examples

Run this code
# 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)

Run the code above in your browser using DataLab