Learn R Programming

fields (version 1.2)

world: Plot of the world

Description

Plots quickly, medium resolution outlines of large land masses and bodies of water.

Usage

world(ylim=c(-90, 90), xlim=c(-180, 180), add=FALSE, asp = 1,
      xlab = "", ylab = "",  xaxt = "n", yaxt = "n", ...)

Arguments

ylim
range of latitudes
xlim
range of longitudes
add
logical; if true will add the world map to current plot.
asp
aspect ratio used if add is false, see plot.default.
xlab,ylab
labels for x- and y-axis; empty by default.
xaxt,yaxt
axis type for x- and y-axis; empty by default.
...
These are graphical arguments that are passed to the lines (and plot if add is false) function that draws the outline.

Details

This function uses the FIELDS dataset world.dat for the coordinates. The main advantage of this function is that it is fast and easy to modify.

Examples

Run this code
# Draw map in device color number 2 ( usually red?) 

world( col=2)

## Western Europe (*which* big island is missing ?)
## with a (light color!) coordinate grid:

world(xlim=c(-10,18),ylim=c(36,60), xaxt = "s", yaxt = "s")
grid()

Run the code above in your browser using DataLab