globeearth: Plot Earth as 3D Globe

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/ajbplot.R

Description

Plots the Earth as a 3D sphere, seen from a specified viewpoint, with a map of the major coastline (by default).

Usage

1
  globeearth(gdata, runlen, eye, top, ..., do.plot=TRUE)

Arguments

gdata

Two-column matrix of latitude, longitude coordinates of coastline vertices. Defaults to earth$coords. If NULL, no coastline is plotted.

runlen

Integer vector giving the number of vertices in each connected polygon in the coastline. Defaults to earth$runlen.

eye

Viewpoint. A vector of length 3 (or a list(lon,lat)) determining a position in space. If unspecified the last value from a call to globeearth will be used. If this is the first call to globeearth the default value of zero degrees latitude and longitude will be used.

top

Vector of length 3 (or a list(lon,lat)) determining a position in space. The plot will be rotated so that this position appears to be directly above the centre of the earth. If unspecified the last value from a call to globeearth will be used. If this is the first call to globeearth the default value of 90 degrees latitude and zero degrees longitude (i.e. the North Pole) will be used.

...

Arguments passed to segments controlling the plotting of the coastline.

do.plot

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

Details

The globe is drawn as it would be seen by a viewer at position eye, with the location top at the top of the plot. Only those parts of the coastline that are visible from eye (on the side of the globe facing eye) will be plotted.

Value

(Invisibly) a 4-column matrix containing the projected (x,y) coordinates of the segments of the coastline.

Author(s)

Adrian Baddeley and Tom Lawrence

See Also

flatearth.

Use globepoints to add points to this plot, globelines to add lines to this plot, globearrows to add arrows to this plot, and globedrawlat or globedrawlong to draw latitude and longitude curves.

Examples

1
2
   globeearth()
   globeearth(eye=place("madrid"))

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