Learn R Programming

gmt (version 1.2-0)

pscoast: Draw GMT Map

Description

Call GMT to draw a map (coastlines, borders, rivers) and save in postscript format.

Usage

pscoast(cmd, file=getOption("gmt.file"))

Arguments

cmd
string of arguments passed to pscoast.
file
filename where the map will be saved.

Value

Null, but a map is drawn and saved in postscript format.A file named ‘.gmtcommands4’ is created in the current map directory, dirname(file). It can be removed later using psclose().

Details

The file argument can be supplied with (recommended) or without a full directory path. Without a path, the current working directory is used (see getwd and setwd).

File type should be ‘.eps’ when PAPER_MEDIA is A4+ or letter+, but ‘.ps’ otherwise.

See the GMT documentation for details on pscoast and other GMT commands.

See Also

Similar to plot and postscript in native R graphics.

gmt, pscoast, psxy, pstext, psbar, and psclose work together to draw maps.

gmt-package gives an overview of the package.

Examples

Run this code
## Not run: 
# # Draw map and save as "map.eps" in current working directory
# gmt(demo.par)
# pscoast(demo.coast)
# psxy(demo.xy)
# pstext(demo.text)
# psbar(demo.bar, ref=66)
# psclose()
# # See directory gmt/example for details
# 
# # Map in one call
# pscoast("-JM12c -R7E/38E/29N/48N -G100 -B5", "x.ps")
# ## End(Not run)

Run the code above in your browser using DataLab