Learn R Programming

gmt (version 1.2-0)

gmt: Initialize GMT Session

Description

Initialize a GMT session by setting graphical parameters and current postscript file.

Usage

gmt(par=NULL, file="map.eps", style="s", quiet=TRUE)

Arguments

par
optional string of GMT parameters, "PARAMETER1=value1 PARAMETER2=value2 ...", passed to gmtset.
file
postscript filename used in subsequent calls to GMT plot functions, passed to options()
style
default units and values: "s" for SI (international) or "u" for United States, passed to gmtdefaults.
quiet
whether current settings should be displayed.

Value

List containing the current options("gmt.file").If par is NULL, no GMT parameters are changed, but the current parameter values and postscript filename can be reviewed.If par is a string (empty "" will do), a file named ‘.gmtdefaults4’ 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 R 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 graphical parameters, gmtdefaults, gmtset and other GMT commands.

See Also

options could be used to set gmt.file directly.

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 R 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
# ## End(Not run)

Run the code above in your browser using DataLab