plot.planform: plot.planform

Description Usage Arguments Value See Also Examples

View source: R/plot.planform.R

Description

Plots spatial data from an object of class "adcp.planform"

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plot.planform(data, x, interpolate, coord = "projected.utm",
  point.spacing = 1, point.color = jet.colors, arrows = TRUE,
  arrow_scale = 1, arrowwd = 1, arrow.key, keyCol = "black",
  textCol = "black", xUnits = NULL, cellWidth, cellHeight,
  interpolate.color = jet.colors, xlab = list(label = "X Coordinates",
  fontsize = 18), ylab = list(label = "Y Coordinates", fontsize = 18),
  ylab.right = list(label = as.character(interpolate), fontsize = 18),
  colorkey = list(labels = list(cex = 1.25)), scales = list(cex = c(1.25,
  1.25)), key.cex = 1.25, xlim, ylim, aspect = "iso",
  par.settings = list(layout.widths = list(axis.key.padding = 0, ylab.right =
  2)), ..., contour = TRUE, cuts = 7, labels = TRUE, contourwd = 1)

Arguments

data

An object of class "adcp.planform"

x

Parameter to be plotted as points using xyplot

interpolate

Optional. Parameter to plot using levelplot, if provided in addition to x the interpolated parameter is overlaid by x.

coord

Spatial coordinates used to define x and y-axes, can be orthogonally "projected.utm" (default), "utm", orthogonally "projected.latlong", or "latlong".

point.spacing

Distance between points, default is 1.

point.color

Color of points displayed, maybe numeric, character string, or function. Default is jet.colors.

arrows

If TRUE (default) and x is a velocity vector, arrows indicating flow direction are plotted

arrow_scale

Multiplication factor for sizing secondary flow arrows, default is 1

arrowwd

Line width of arrows

arrow.key

Numeric vector of length 2 defining the X and y coordinates (c(x,y)) of where scaling key for points or arrows (if arrows = TRUE) should be written. If omitted, a key is placed in the lower left.

keyCol

Color of points or arrows (if arrows = TRUE) in arrow.key, default is "black".

textCol

Colors of text in arrow.key, default is "black".

xUnits

Character string. If provided, the units of x (e.g., "m" or "m/s") to be displayed in arrow.key.

cellWidth

Width of cell size used to grid interpolate. If missing, defaults to 1/100 of the range of xlim.

cellHeight

Height of cell size used to grid interpolate. If missing, defaults to 1/100 of the range of ylim.

interpolate.color

Color function used to display interpolate, see levelplot for details. Default is jet.colots.

xlab

X-axis label, see levelplot for details. Default is "X Coordinates" in size 18 font.

ylab

Y-axis label, see levelplot for details. Default is "Y Coordinates" in size 18 font.

ylab.right

colorkey label, see xyplot for details. Default is as.character(interpolate) in size 18 font.

colorkey

A list of arguments for the color key drawn alongside the plot, see levelplot for details. Default writes the tick labels with cex 1.5.

scales

A list of arguments determining how the axes are drawn, see xyplot for details. Default is to draw tick labels with cex 1.5.

key.cex

Font size of text in arrow.key, default is 1.25

xlim

Numeric vector of length 2 defining the range of the x-axis.

ylim

Numeric vector of length 2 defining the range of the y-axis.

aspect

Controls the aspect ratio of the panels, see xyplot for details. Default is "iso".

par.settings

A list of arguments for fine-tuned control of display, see xyplot and trellis.par.set for details. Default is not to pad the color key, offset the color key label by 2.

...

Additional arguments to be passed to xyplot and levelplot.

contour

Logical, if TRUE (default) and interpolate is defined, contour lines are drawn

cuts

Number of regions contour lines denote

labels

Logical, if TRUE (default) contour lines are labeled

contourwd

Line width of contours

Value

A spatially referenced plot of x and interpolate (if provided).

See Also

process.planform,levelplot, and xyplot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(mNine)
#mNine is a list of MATLAB files
names(mNine)
#Drop the last letter (l or r) from the MATLAB file names
tNames <- substr(names(mNine), 0, nchar(names(mNine))-1)
adcp.planform <- process.planform(mNine, tNames, Dc = 0.0375, n = 2, xWindow = 21)
#Plot depth averaged speed with arrows displaying flow heading
plot.planform(adcp.planform, DepthAveragedSpeed, arrow.key = c(325540,4679130), xUnits = "m/s", arrow_scale = 10)
#Plot depth averaged speed as points
plot.planform(adcp.planform, DepthAveragedSpeed, arrow.key = c(325540,4679130), xUnits = "m/s", arrows = FALSE)
#Plot depth averaged speed overlaying depth
plot.planform(adcp.planform, DepthAveragedSpeed, interpolate = depth, arrow.key = c(325540,4679130), xUnits = "m/s", point.spacing = 10, point.color = "black", ylab.right = list(label = "Depth (m)", fontsize = 18), arrow_scale=10)

jasonfischer/rivSurveyR documentation built on May 18, 2019, 5:54 p.m.