plotMap.CSV: Plots a dataframe or csv file on a map using GMT.

Description Usage Arguments Details Value

View source: R/plotMap.CSV.R

Description

A function to plot a dataframe or csv file on a map using GMT.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plotMap.CSV(dfr = NULL, lat = "latitude", lon = "longitude", col = NULL,
  gmt = 4, title = "Tanner Crab", year = "", xyrng = "180/205/54/62",
  zscl = NULL, zlab = "Catch", zunits = "num. crab", rotate = FALSE,
  elev = 70, delx = 0.5, dely = 0.25, blocktype = c("MEAN", "SUM"),
  plt_blocktype = c("SMOOTH", "COARSE"), logtr = FALSE, plt_title = FALSE,
  plt_bars = FALSE, plt_surface = FALSE, plt_blocklocations = FALSE,
  plt_colorscale = plt_surface | plt_bars, plt_stations = FALSE,
  plt_reflines = FALSE, reflines = list(list(lon = -166 + 0 * seq(from = 50,
  to = 80, by = 1), lat = seq(from = 50, to = 80, by = 1))),
  psFile = "catchMaps", toPDF = FALSE, bathymetryFile = file.path(getwd(),
  "data/depthcontour_200500.prn"), cleanup = FALSE)

Arguments

dfr

= dataframe or csv file to plot

lat

= column name containing latitudes

lon

= column name containing longitudes

col

= name of column containing z data

gmt

= GMT version (4 or 5)

title

= map title

year

= year label

xyrng

= x-y range for map as GMT string ('xmin/xmax/ymin/ymax')

zscl

= z-scale (max) for map

zlab

= label for z axes

zunits

= units for z axes

rotate

= flag (T/F) or value of angle for map rotation (angle=180 if rotate=T/F)

elev

= elevation for map perspective is rotate is not FALSE

delx

= x increment for associated grids

dely

= y increment for associated grids

blocktype

= flag ('MEAN' or 'SUM') for grouping data

plt_blocktype

= flag ('SMOOTH','COARSE') for displaying surface

logtr

= flag to ln-transform z data

plt_title

= flag to include title on map

plt_bars

= flag to plot data as bars

plt_surface

= flag to plot data as a color density image

plt_blocklocations

= flag to plot block locations as X's

plt_colorscale

= flag to plot color scale

plt_reflines

= flag to include refernce lines on map

reflines

= list of lists(lon=,lat=) of reference lines to plot

psFile

= filename for output file (no extension–will be pdf)

cleanup

= flag to remove temporary files

pdfDir

= directory for output file

bathymetryfile

= filename of bathymetry to plot

Details

External Requirements: * GMT 4.5.x * on Windows, need both gswin32c and gswin64c installed * on network, need to use mapped drives to specify files
Z-values > zscl are truncated to zscl so they will plot (otherwise GMT removes them completely, apparently)

Value

z-scale used for plot.


wStockhausen/wtsGMT documentation built on May 3, 2019, 7:36 p.m.