Description Usage Arguments Details Value See Also Examples
View source: R/plot.xSec.default.R
Plots cross-section velocities given an object of class "adcp.secondary"
1 2 3 4 5 6 7 8 9 10 11 | plot.xSec.default(data, x, transect, cellWidth, cellHeight, arrows = TRUE,
arrow.x.spacing, arrow.y.spacing, arrow_scale = 1, arrowCol = "black",
arrowwd = 1, lwd = 1, arrow.key, keyCol = "white", lineCol = "white",
col.regions = jet.colors, scale.by = "individual", xlab = list(label =
"Distance (m)", fontsize = 18), ylab = list(label = "Depth (m)", fontsize =
18), ylab.right = list(label = "Velocity (m/s)", fontsize = 18),
header = transect, headersize = 18, colorkey = list(labels = list(cex =
1.5)), scales = list(cex = c(1.5, 1.5)), key.cex = 1.25, xlim, ylim,
aspect = "iso", par.settings = list(layout.widths = list(axis.key.padding
= 0, ylab.right = 2), panel.background = list(col = "black")), ...,
contour = TRUE, cuts = 7, labels = TRUE)
|
data |
An object of class "adcp.secondary" |
x |
Parameter to be plotted |
transect |
Transect to be plotted |
cellWidth |
Width of cell size used to grid x. If missing, defaults to mean cell width from dataset |
cellHeight |
Height of cell size used to grid x. If missing, defaults to mean cell height from dataset |
arrows |
If TRUE (default) and x is a primary velocity vector, arrows indicating secondary flow velocity are plotted |
arrow.x.spacing |
Horizontal spacing between secondary flow arrows. Units equal to units of x-axis (i.e., distance from start of transect). |
arrow.y.spacing |
Vertical spacing secondary flow arrows. Units equal to units of y-axis (i.e., depth). |
arrow_scale |
Multiplication factor for sizing secondary flow arrows, default is 1 |
arrowCol |
Color of secondary flow arrows, default is "black" |
arrowwd |
Line width of arrows |
lwd |
Line width of surface and bottom outlines |
arrow.key |
Numeric vector of length 2 defining the X and y coordinates (c(x,y)) of where scaling key for secondary flow arrows should be written. If omitted, a key is placed in the lower left. |
keyCol |
Color of text and arrows in arrow.key, default is "white" |
lineCol |
Line color of surface and bottom outlines, default is white |
col.regions |
Color function used to display x, see levelplot for details. Default is jet.colors. |
scale.by |
Character string. If "individual" (default) variables in plot are scaled to their range in the cross-section plotted. If "all" variables in plot are scaled to their range in the dataset provided. See 'details' for additional information |
xlab |
X-axis label, see levelplot for details. Default is "Distance (m)" in size 18 font. |
ylab |
Y-axis label, see levelplot for details. Default is "Depth (m)" in size 18 font. |
ylab.right |
|
header |
Title of plot, default is transect |
headersize |
Font size of header, default is 18 |
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. See 'details' for additional information. |
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, and draw a black background. |
... |
Additional arguments to be passed to levelplot. |
contour |
Logical, if TRUE (default), contour lines are drawn |
cuts |
Number of regions contour lines denote |
labels |
Logical, if TRUE (default) contour lines are labeled |
When producing multiple plots of cross-sections, setting scale.by to "all" eases comparison among plots by using the same scale for all plots. Setting scale.by to "individual" exaggerates differences within individual cross-sections.
If scale.by equals "individual" default for ylim
is the max depth of the cross-section to -0.5. If scale.by equals "all" default for ylim
is the max depth of the dataset to -0.5.
Use transect argument to subset data by transect, may produce error if data is subset prior to being supplied to function.
A levelplot plot of the cross-section
plot.xSec, levelplot, process.secondary, and xyplot.
1 2 3 4 5 6 7 8 9 | 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.secondary <- process.secondary(mNine, tNames, rotation = c("xSec", "rozovskii", "zeroSecQ"), xWindow = 21, yWindow = 5)
plot.xSec(adcp.secondary, vp.zsq, transect = "t1")
#Use the same scale to display primary and secondary velocities of two cross-sections
plot.xSec(adcp.secondary, vp.zsq, transect = "t1", scale.by = "all")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.