Learn R Programming

globe (version 1.2-0)

globeearth:

Description

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

Usage

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.

Value

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

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.

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

Run this code
   globeearth()
   globeearth(eye=place("madrid"))

Run the code above in your browser using DataLab