gmt: Initialize GMT Session

View source: R/gmt.R

gmtR Documentation

Initialize GMT Session

Description

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

Usage

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

Arguments

par

optional string of GMT parameters, "PARAMETER1=value1 PARAMETER2=value2 ...", passed to GMT shell command 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 GMT shell command gmtset.

quiet

whether current settings should be displayed.

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).

See the GMT documentation for details on graphical parameters, gmtdefaults, gmtset and other GMT commands.

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 GMT configuration file is created in the current map directory, dirname(file).

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

## Not run: 
# Draw map and save as "map.ps" in R working directory
gmt(demo.par)
pscoast(demo.coast)
psxy(demo.xy)
pstext(demo.text, "-J -R -F+f+a+j -O -K")
psbar(demo.bar, ref=66)
psclose()
# See directory gmt/example for details

## End(Not run)

arnima-github/gmt documentation built on April 21, 2023, 7:12 p.m.