R/psxy.R

Defines functions psxy

Documented in psxy

psxy <- function(x, cmd="-J -R -Scp -W2p -O -K", file=getOption("gmt.file"))
{
  if(is.null(file))
    stop("please pass a valid 'file' argument, or run gmt(file=\"myfile\")")
  owd <- setwd(dirname(file)); on.exit(setwd(owd))

  tmp <- paste(dirname(tempdir()), "xy.gmt", sep="/")
  r2gmt(x, tmp)
  gmt.system(paste("gmt psxy",tmp,cmd), file=file, append=TRUE)

  invisible(NULL)
}

Try the gmt package in your browser

Any scripts or data that you put into this service are public.

gmt documentation built on June 7, 2022, 1:11 a.m.