globelines: Plot points, lines and arrows on a globe

Description Usage Arguments Details Value See Also Examples

View source: R/ajbplot.R

Description

Plot points, lines and arrows on an plot of the Earth created by globeearth

Usage

1
2
3
  globepoints(loc, eye, top, ..., do.plot=TRUE) 
  globelines(loc, eye, top, ..., do.plot=TRUE) 
  globearrows(loc, eye, top, len=0.3, ..., do.plot=TRUE) 

Arguments

loc

A matrix or list of points to plot (globepoints), draw lines between (globelines) or draw arrows at (globearrows), in order.

eye

Viewpoint. Should not be specified under normal circumstances since it is set by a previous call to globeearth (details documented there).

top

Top of plot (commonly the North Pole). Should not be specified under normal circumstances since it is set by a previous call to globeearth (details documented there).

len

Length of arrows to be plotted (globearrows only)

...

Optional additional arguments passed to points (globepoints) or segments (globelines, globearrows).

do.plot

Logical value indicating whether to actually perform the plotting, or just to return the calculated coordinates.

Details

globeearth needs to be invoked first before any of these functions can be used. The values of eye and top in globeearth should be identical to the values used in these functions to get meaningful results.

globepoints plots points at the specified locations on the globe.

globelines draws line between the specified locations in the order that they are written, but not between the first and last points e.g. if we list three different points A, B, C in loc, then lines will be drawn from A to B, and from B to C, but not C to A.

globearrows plots lines at the specified locations, that extend away from the centre of the globe and are of the specified length.

Value

The return value is invisible. For globepoints, the return value is a list(x,y) giving the plotted coordinates of the points. For globelines and globearrows, the return value is a 4-column matrix giving the plotted coordinates of the lines or arrows as plotted by segments.

See Also

globeearth.

Use globedrawlat or globedrawlong to draw latitude and longitude curves.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ex1 <- matrix(nrow=3, ncol=2)
ex1[1,1] <- -80
ex1[1,2] <- 45
ex1[2,1] <- -60
ex1[2,2] <- 45
ex1[3,1] <- -50
ex1[3,2] <- 50
globeearth(eye=place("newyorkcity"))
globepoints(loc=ex1)
globelines(loc=ex1)
globearrows(loc=ex1)

baddstats/globe documentation built on June 4, 2017, 12:12 a.m.