View source: R/cpplot3d.event.R

Interactive scatterplot of the (3 dimensional) points either plotted by color and size or number of points in each voxel corresponding to the value of the points.

Interactive scatterplot of the (3 dimensional) points either plotted by color and size or number of points in each voxel corresponding to the value of the points.

Interactive scatterplot of the (3 dimensional) points either plotted by color and size or number of points in each voxel corresponding to the value of the points.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | ```
cplot3d.event(event = 1, t = 1, turns = 10, cruise = 2009116,
TVG = TRUE, TVG.exp = 2, dir.data = NULL, Paout = TRUE,
exact = FALSE, bgns = TRUE, pdns = TRUE, nrns = TRUE, hins = TRUE,
kern = NULL, segpar = NULL, pamkpar = list(), nsind = 0.75,
hins_add = 10, pdns_scale = 1e-14, TOV = 0, cal = 1, bmmd = NULL,
breaks = 40, col = "combined", colpar = list(start = 0, end = 0.8, flip
= TRUE), clamp = c(0, 1), shrink = TRUE, null.value = NA, white = 1,
log = TRUE, color.bar = "y--", color.bar.lwd = 8, color.bar.adj = 0,
color.bar.tadj = 0.1, color.bar.noWhite = TRUE, color.bar.nticks = 8,
color.bar.tickw = 0.005, color.bar.tickcol = "black", db = TRUE,
voxels.out = FALSE, esnm = "MS70", var = c("vbsc", "sgsc", "pr0s",
"sgs0", "sgsE", "sgsi", "sgsI", "psis", "tlns"), ind = list(-(1:150), NULL),
range = list(), subset = NULL, ideal = TRUE, seabed = -12000,
rot = 2, compensation = c("pitch", "roll"), plot = TRUE,
cs.xyzlim = "g", add = FALSE, beamstypes = 1,
size = cplot3d.size("pow", y = 20, par = 4), bottom = FALSE,
bottom.res = 5, bottom.smooth = NULL, bottom.col = "topo.col",
bottom.N = 1e+05, bottom.seg = list(sgth = 0.2, misM = 0.001, bwGp = 2,
turns = 100), adds = NULL, xlim = NULL, ylim = NULL, zlim = NULL,
view = c("free", "top", "bottom", "south", "west", "north", "east"),
zoom = 0.7, fov = 60, school = FALSE, schoolcol = "purple",
schoolsize = 0.3, schoolsample = 0.01, schoollen = 4, schoollwd = 1,
schooltype = "p", schoolcrop = FALSE, plot.seg = FALSE,
seg.col = "green", seg.alpha = 0.2, subdivide = 3, excl.neg = TRUE,
object = c("ellipsoid", "cuboid"), par = double(3), center = c(0, 0, 0),
angle = 0, aspect = "iso", nticks = 5, origin = 1, xlab = "x",
ylab = "y", zlab = "z", full.box = FALSE, edge.vpos = "",
line.vpos = 0, at.vpos = NULL, cex.vpos = 1, col.vpos = "blue",
clock = "bbl", cex.clock = 1, adj.clock = c(0, 0),
format.clock = "Ping: indt\nyyyy-mm-dd\nHH:MM:SS.FFF", digits.clock = 2,
lsp.clock = 0.04, col.clock = 4, sonar.grid = "frame",
sonar.grid.col = c("orange", "cornflowerblue"), sonar.grid.lwd = 1,
cs.pos = "g", cs.view = "g", sides = c("tb", "tb"), dens = c(200, 100,
100, 1), every = Inf, global.grid = FALSE, global.grid.lwd = 0.5,
global.grid.lty = 1, ...)
cpplot3d.event(cpplot3d_type, event = 1, t = 1, turns = 10,
cruise = 2009116, TVG = TRUE, TVG.exp = 2, dir.data = NULL,
Paout = TRUE, exact = FALSE, bgns = TRUE, pdns = TRUE, nrns = TRUE,
hins = TRUE, kern = NULL, segpar = NULL, pamkpar = list(),
nsind = 0.75, hins_add = 10, pdns_scale = 1e-14, TOV = 0, cal = 1,
bmmd = NULL, breaks = 40, col = "combined", colpar = list(start = 0,
end = 0.8, flip = TRUE), clamp = c(0, 1), shrink = TRUE,
null.value = NA, white = 1, log = TRUE, color.bar = "y--",
color.bar.lwd = 8, color.bar.adj = 0, color.bar.tadj = 0.1,
color.bar.noWhite = TRUE, color.bar.nticks = 8, color.bar.tickw = 0.005,
color.bar.tickcol = "black", db = TRUE, voxels.out = FALSE,
endcol = c("", ""), N = 1e+05, acca = NULL, fun = "mod",
allert = 1e+08, nlim = NULL, fact = NULL, cols = c("black",
"navyblue", "magenta4", "red3", "darkorange2", "yellow"), stretch = 1,
scale.voxels = 1, rand.gen = c("unif", "beta", "norm"), possample = 1,
esnm = "MS70", var = c("vbsc", "sgsc", "pr0s", "sgs0", "sgsE", "sgsi",
"sgsI", "psis", "tlns"), ind = list(-(1:150), NULL), range = list(),
subset = NULL, ideal = TRUE, seabed = -12000, rot = 2,
compensation = c("pitch", "roll"), plot = TRUE, cs.xyzlim = "g",
add = FALSE, beamstypes = 1, size = cplot3d.size("pow", y = 20, par =
4), bottom = FALSE, bottom.res = 5, bottom.smooth = NULL,
bottom.col = "topo.col", bottom.N = 1e+05, bottom.seg = list(sgth = 0.2,
misM = 0.001, bwGp = 2, turns = 100, ind = list(-(1:100), NULL)),
adds = NULL, xlim = NULL, ylim = NULL, zlim = NULL, view = c("free",
"top", "bottom", "south", "west", "north", "east"), zoom = 0.7, fov = 60,
school = FALSE, schoolcol = "purple", schoolsize = 0.3,
schoolsample = 0.01, schoollen = 4, schoollwd = 1, schooltype = "p",
schoolnumt = NULL, schoolcrop = FALSE, plot.seg = FALSE,
seg.col = "green", seg.alpha = 0.2, subdivide = 3, excl.neg = TRUE,
object = c("ellipsoid", "cuboid"), par = double(3), center = c(0, 0, 0),
angle = 0, aspect = "iso", nticks = 5, origin = 1, xlab = "x",
ylab = "y", zlab = "z", full.box = FALSE, edge.vpos = "",
line.vpos = 0, at.vpos = NULL, cex.vpos = 1, col.vpos = "blue",
clock = "bbl", cex.clock = 1, adj.clock = c(0, 0),
format.clock = "Ping: indt\nyyyy-mm-dd\nHH:MM:SS.FFF", digits.clock = 2,
lsp.clock = 0.04, col.clock = 4, sonar.grid = "frame",
sonar.grid.col = c("orange", "cornflowerblue"), sonar.grid.lwd = 1,
cs.pos = "g", cs.view = "g", sides = c("tb", "tb"), dens = c(200, 100,
100, 1), every = Inf, global.grid = FALSE, global.grid.lwd = 0.5,
global.grid.lty = 1, ...)
pplot3d.event(event = 1, t = 1, turns = 10, cruise = 2009116,
TVG = TRUE, TVG.exp = 2, dir.data = NULL, Paout = TRUE,
exact = FALSE, bgns = TRUE, pdns = TRUE, nrns = TRUE, hins = TRUE,
kern = NULL, segpar = NULL, pamkpar = list(), nsind = 0.75,
hins_add = 10, pdns_scale = 1e-14, TOV = 0, cal = 1, bmmd = NULL,
N = 1e+05, acca = NULL, fun = "mod", allert = 1e+08, nlim = NULL,
fact = NULL, cols = c("black", "navyblue", "magenta4", "red3",
"darkorange2", "yellow"), stretch = 1, scale.voxels = 1,
rand.gen = c("unif", "beta", "norm"), possample = 1, esnm = "MS70",
var = c("vbsc", "sgsc", "pr0s", "sgs0", "sgsE", "sgsi", "sgsI", "psis",
"tlns"), ind = list(-(1:150), NULL), range = list(), subset = NULL,
ideal = TRUE, seabed = -12000, rot = 2, compensation = c("pitch",
"roll"), plot = TRUE, cs.xyzlim = "g", add = FALSE, beamstypes = 1,
size = 0.3, bottom = FALSE, bottom.res = 5, bottom.smooth = NULL,
bottom.col = "topo.col", bottom.N = 1e+05, bottom.seg = list(sgth = 0.2,
misM = 0.001, bwGp = 2, turns = 100), adds = NULL, xlim = NULL,
ylim = NULL, zlim = NULL, view = c("free", "top", "bottom", "south",
"west", "north", "east"), zoom = 0.7, fov = 60, school = FALSE,
schoolcol = "purple", schoolsize = 0.3, schoolsample = 0.01,
schoollen = 4, schoollwd = 1, schooltype = "p", schoolcrop = FALSE,
plot.seg = FALSE, seg.col = "green", seg.alpha = 0.2, subdivide = 3,
excl.neg = TRUE, object = c("ellipsoid", "cuboid"), par = double(3),
center = c(0, 0, 0), angle = 0, aspect = "iso", nticks = 5,
origin = 1, xlab = "x", ylab = "y", zlab = "z", full.box = FALSE,
edge.vpos = "", line.vpos = 0, at.vpos = NULL, cex.vpos = 1,
col.vpos = "blue", clock = "bbl", cex.clock = 1, adj.clock = c(0, 0),
format.clock = "Ping: indt\nyyyy-mm-dd\nHH:MM:SS.FFF", digits.clock = 2,
lsp.clock = 0.04, col.clock = 4, sonar.grid = "frame",
sonar.grid.col = c("orange", "cornflowerblue"), sonar.grid.lwd = 1,
cs.pos = "g", cs.view = "g", sides = c("tb", "tb"), dens = c(200, 100,
100, 1), every = Inf, global.grid = FALSE, global.grid.lwd = 0.5,
global.grid.lty = 1, ...)
``` |

`event` |
is the identifier of the event, either given as the number of the event, a string contained in the name of the event, or the path of the event directory. |

`t` |
is either a vector of the numbers of the pings to be returned, as listed from 1 to the number of pings in the event, or a vector of time points given as strings "yyyymmddHHMMSS.FFF" or "HHMMSS.FFF" from which the range of the time points to be read is extracted. If t=="all", all files are read and if t=="none" an empty list is returned. |

`turns` |
is the number of pings read and plotted in each turn, useful if many time points are to be plotted and memory is an issue (such as >100 time steps for MS70). |

`cruise` |
is either the idenfication number of the cruise, given as specified by the IMR (yyyynnn), or the path to the directory containing the event to be read. |

`TVG` |
is FALSE if no Time Varied Gain compensation is to be performed on the acoustic data. |

`dir.data` |
is the path to the directory in which the projects are stored, defaulted by the variable Acoustics_datasets_directory(). |

`Paout` |
is TRUE if pressure data are to be returned in Pascal. |

`exact` |
is TRUE if the volumes should be calculated by the slower procedure incorporating the edges of the voxels. If FALSE (default) use the fast functions which only account for changes in the thickness of the voxels. |

`bgns` |
indicates wheter the estimated background noise should be subtracted, resulting in some negative sv-values. If FALSE the background noise estimates are attemptedly located in the event directory or the noise estimate directory of the cruise. If string, it should be the path to the file holding the background noise estimates. If the length of 'bgns' is longer than 1, the background noise estmate taken as the simple mean for all beams, regardless of the periodic noise is used. |

`pdns` |
indicates wheter the estimated periodic noise should be subtracted. If FALSE the periodic noise estimates are attemptedly located in the event directory or the noise estimate directory of the cruise. If string, it should be the path to the file holding the periodic noise estimates. |

`nrns` |
indicates wheter the estimated near range (close range) noise should be subtracted. If FALSE the near range noise estimates are attemptedly located in the event directory or the noise estimate directory of the cruise. |

`hins` |
indicates wheter the estimated high intensity noise should be subtracted. If FALSE the high intensity noise estimates are attemptedly located in the event directory or the noise estimate directory of the cruise. |

`kern` |
is the standard deviation in units of the number of voxels used in a Gaussian kernel smoother along the beams (no smoothing if kern==0 or length(kern)==0, which is the default). |

`segpar` |
is a list of elements named "bwGp", "lsth"/"rlst", "usth"/"rust", or "sgth"/"sgt0" specifying the parameters of the segmentation data to read. |

`pamkpar` |
is a list of parameters ('krange', 'criterion', 'alpha' and 'mindist') used pamk() when clustering the segmented voxels 'sgsc'. The voxels 'sgsc' are also ordered so that the voxels belonging to the largest cluster lead and the second to largest cluster follows. A suggested set of parameters are pamkpar=list(krange=1:4,criterion="asw",alpha=0.05,N=1e2,mindist=100). |

`nsind` |
is a vector of indexes along the beams, as input to ind.expand(), used to select the subset over which the estimation of the phase of the periodic noise is done. If given as a single numeric, the outermost 'nsind' voxels are used in each beam. |

`hins_add` |
is the number of voxels that should be discarded on both sides of high intensity noise voxels voxels along beams, used for accounting for possible high values that are related to the high intensity noise but not classified as such voxels. |

`pdns_scale` |
is used in get.pdns_phase.event() to scale the noise in order to allow the optimization to work. |

`TOV` |
is the time offset of the vessel information, discovered by Holmin and Korneliussen in 2013. The default is found in "/Applications/echoIBM/Documentation/Error in yaw MS70/Error in yaw MS70.R". |

`breaks` |
has two possible inputs: (1) the number of breaks of the scale on which the data 'z' are arranged, equally spaced between min(z) and max(z) (or logarithmically equaly spaced when log=TRUE). (2) a vector of values for the breaks given in dB values (volume backscattering strength Sv), typically -82:-30 for EK60. |

`col` |
is either the color vector if length(col)>1, or the color function to generate the colors from. Currently the color function name must be one of "rainbow", "grey", "heat.colors", "terrain.colors", "topo.colors" and "cm.colors", but other color functions may be inplemented in the future. Set color.bar=NULL to supress plotting the color bar. |

`colpar` |
is a list of parameters used in colscale(). |

`clamp` |
is a vector of two elements defining the start and end value along the range of the data, outside which the colors plotted are the colors representing the lowest bin and the highest bin, (depending on the value of 'flip' and/or 'start' and 'end' specified in 'colpar'). If given in [0,1] 'clamp' refers to the fractions along the range of the data, and to dB values if not. |

`shrink` |
is TRUE if discarded points due to the value of 'white' are to be excluded from the plott, so that the bounding box is shrinked to the range of visible points. |

`null.value` |
is is the value to set non-postitive values to in the case of logarithmic plotting. The default is the only non-numeric value allowed, and uses the smallest positive value of the data. |

`white` |
is an integer value representing the number of the lower breaks for which points should not be plotted (corresponding to white points). Can be given as a dB value below which breaks are plotted as white. |

`log` |
is TRUE if log transformed data are to be plotted. If so, all values must be positive. |

`color.bar` |
is a string of three characters, where the first is one of "x", "y", "z", and denotes along which dimension the color bar should be parallel, the second and third characters are either "-" or "+", and denotes along which of the four edges parallel to the axis given by the first charater, the color bar should be put (where the axes are ranged "x", "y", "z"). color.bar="x-+" puts the color bar on the top south edge, if the x-axis is defined east, the y-axis north and the z-axis vertical. If 'color.bar' is FALSE, NULL or "", plotting of the color bar is suppressed. |

`color.bar.lwd` |
is the line width of the color bar (thickness). |

`color.bar.adj` |
is a vector of adjustment values for the color bar (in the x, y, and z direction), where the values are given as fractions of the size of the corresponding dimensions. If given as a single numeric, 'color.bar.adj' is interpreted as the adjustment in the lowest available dimension (for example in the y direciton if color.bar="x–"). |

`color.bar.tadj` |
is similar to 'color.bar.adj', but for the labels of the tickmarks on the color bar. |

`color.bar.noWhite` |
is FALSE to include all values which are not plotted due to 'white' in the color bar. |

`color.bar.nticks` |
is the desired number of ticks on the color bar, used in pretty(). |

`color.bar.tickw` |
is the thickness of the tick marks on the color bar, as a fraction of the plotting frame. |

`color.bar.tickcol` |
is the color of the tich marks. |

`db` |
is FALSE if the color bar should display linear (not desibel) values. |

`voxels.out` |
is TRUE if the position of all voxels plotted should be included in the output. |

`esnm` |
is the name of the acoustical instrument, given as a four character string. See sonR_implemented() for the implemented systems. May be given in 'data', and in lower case. |

`var` |
is a string specifying the variable to plot. Currently supported are "vbsc", for volume backscattering data, "sgsc"/"sgs0"/"sgsE"/"sgsi"/"sgsI", for (thresholded) segmentation data, "pr0s" or "psis" for unhtresholded not-school probability data, and "tlns" for pure estimated noise. Segmentation data can be subtracted or added to the data by by adding "+" or "-" to a second element of var, where this is a segmentation variable name such as "-sgbt", which implies subtracting bottom segmentation mask. See cpplot3d.extract_var(). |

`ind` |
is a list of indexes, as typed into the [] of an array, where 0 and NULL denotes all indexes. |

`range` |
is a list of elements with names matching names of 'data', specifying the range of the corresponding elements. |

`subset` |
is a numeric or logical vector/expression indicating elements or rows to keep. Missing values are taken as false, and subset=0 or subset=NULL indicates no subsetting. |

`ideal` |
is TRUE to represent the simple case where the speed of sound 'data$asps' is invariant of depth. |

`seabed` |
is the depth of the seabed, at which the beams are reflected when calculating the midpoints of voxels. |

`rot` |
see soundbeam.TSD(). |

`compensation` |
is a vector of string giving which rotation values that are compensated for in the sonar. Only c("pitch","roll") is available for the current version. Used in soundbeam.TSD. |

`plot` |
is FALSE to prevent plotting. |

`cs.xyzlim` |
defines the coordinate system to use when specifying the plotting frame. Given as one of "g" or "v" representing the global coordinate and the coordinate system of the vessel. |

`add` |
is TRUE if points are to be added to an existing plot. |

`beamstypes` |
is a vector of strings "rect" and "circ", or a vector integers 1 and 2 specifying whether to plot rectangular og circular beams. If beamstypes==1, the rectangular beams are plotted if both present, and the once present are plotted if only rectangular or only circular beams are present. |

`size` |
is the size vector of the points (see plot3d()), or a function of the number of breaks, such as the functions returned by cplot3d.size(), or a list of inputs to cplot3d.size(). |

`bottom` |
has five possible values: (a) If bottom=="new", a new set of segmentation data is generated, where the bottom is detected due to the default specifications used in echoIBM.segment.event() (sgth=0.2, misM=1e-3, bwGp=2, turns=100). Note that no plot is generated when bottom=="new". (b) If 'bottom' is FALSE or 0, no bottom is plotted or removed (default). (c) If 'bottom' is TRUE or 1, the segmentation mask holding the bottom (sgbt) is removed from the data, and a surface generated by cpplot3d.bottom.TSD() based on points generated by pplot3d.TSD() is plotted. (d) If bottom==2, the segmentation mask holding the bottom, and all voxels below these voxels, are removed from the data, and the surface plotted as in (c). (e) If 'bottom' is negative, the same action is taken as for positive values, but the bottom surface is not plotted (only removing the bottom segmentation mask, and everything below in the case that bottom=-2). |

`bottom.res` |
is the resolution in meters of the grid to which the bottom is estimated. Higher values causes smoother bottom, but more spiky edges. Lower values causes more noise and a risk of missing fields in the bottom surface. |

`bottom.col` |
is the function to use for coloring the bottom surface, generated by colscale(). Possibel values are "rainbow", "grey", "heat.colors", "terrain.colors", "topo.colors", "cm.colors", and "combined". Use ... to set parameters of the color function, such as 'start' and 'end'. See colscale() for explaination of parameters of the color functions. |

`bottom.N` |
is the number of points generated by pplot3d.TSD() upon which the generated bottom surface is calculated by interpolation. High values may lead to more accurate bottom surface, but will also be time demanding. |

`bottom.seg` |
is a list of segmentation parameters used when segmenting out the bottom or selecting previously generated segmentation masks. Do not change these settings unless the preformance of the segmentation method is unsatisfactory for the specific data set. Specifically, 'sgth' denotes that the default segmentation threshold is raised to the power 'sgth' in order to allow for large segmentation mask covering all points of the bottom; 'misM' is the input mean volume backscatterinf coefficient specifying the levels of the bottom; 'bwGp' is the bandwidth in meters of the Gaussian kernel used in echoIBM.segment.event(); and 'turns' is the number of pings used in each turn of the segmentation method, where higher values leads to fewer edge effects in the bottom surface. |

`adds` |
is an optional list of variables overriding the variables in 'data'. |

`xlim` |
the x limits (x1, x2) of the plot. Can only be used to increase the plotting frame. Note that x1 > x2 is allowed and leads to a ‘reversed axis’. If one of xlim, ylim or zlim is NA, all the data and the entire sonar frame are included in the plot. |

`ylim` |
the y limits (y1, y2) of the plot. Can only be used to increase the plotting frame. Note that x1 > x2 is allowed and leads to a ‘reversed axis’. If one of xlim, ylim or zlim is NA, all the data and the entire sonar frame are included in the plot. |

`zlim` |
the z limits (z1, z2) of the plot. Can only be used to increase the plotting frame. Note that x1 > x2 is allowed and leads to a ‘reversed axis’. If one of xlim, ylim or zlim is NA, all the data and the entire sonar frame are included in the plot. |

`view` |
defines the view point of the user and has 4 possible values: |

`zoom` |
is the zoom value of the plot, utilized in rgl.viewpoint(). |

`fov` |
is the field of view of the plot, utilized in rgl.viewpoint(). |

`school` |
is a logical indicating whether fish positions stored in .school files present in the event specified by 'event' (and 'cruise' and 'dir.data') are to be plotted with colors 'col.school' and sizes 'size.school'. |

`schoolcol` |
is the color of the points of the fish positions if school==TRUE or a string representing the directory containing .school files to be read for fish positions. |

`schoolsize` |
is the size of the points of the fish positions if school==TRUE or a string representing the directory containing .school files to be read for fish positions. |

`schoolsample` |
is the proportion of the fish positions given by the .school specified by 'school', that are to be sampled for plotting. Useful when the number of fish is large. |

`schoollen` |
is the length of the fish when plotted as lines. |

`schoollwd` |
is the width of the fish when plotted as lines. |

`schooltype` |
is either "p" (default) for plotting points a the fish positions, "l" for plotting the fish as lines in the direcitons of the fish, or "o", for plotting lines with a dot at the head of the fish. Several values can be given. |

`schoolcrop` |
is TRUE to discard school positions to be plotted outside of the specified plotting frame. |

`plot.seg` |
is TRUE if the segmentation volume used for segmenting out the school is to be plotted, and the calculated total echo returned. If plot.seg==FALSE plotting of the volume will not be done but the total echo inside the volume returned. If plot.seg==NULL the total echo will not be calculated or plotted. Specify the segmentation volume with the following parameters: 'object', 'par', 'center', 'angle', 'seg.col' and 'seg.alpha'. |

`seg.col` |
is the color to use for the segmentation volume. |

`seg.alpha` |
is the transparacy parameter to use for the segmentation volume. |

`subdivide` |
is the density of points on the plotted segmentation ellipsoid. |

`excl.neg` |
is FALSE if negative mass values are to be included in the calculation of the centers of mass of the school. |

`object` |
is string representing the type of object to use. Currently implemented are "ellipsoid" and "cuboid" (may be abbreviated). |

`par` |
is a vector of three elements representing the semi axis lengths for ellipsoid and the x-width, y-depth and z-height of cuboid. |

`center` |
is a vector of three elements representing the centre position of the object. |

`angle` |
is the angle of the major axis of the ellipsoid in the x-y-plane, in the case that object=="ellipsoid". |

`aspect` |
is used to set the dimension of the plotting frame (see aspect3d()). |

`nticks` |
is either a single integer specifying the suggested number of ticks used on the axes, or a vector of three elements giving the number of ticks on each axis, in which case the axes will NOT move so that they may obscure the data. |

`origin` |
is (1) a vector of two elements representing the origin of the global coordinate system (G), (2) the numbering index of the ping in the total sequence of pings of the event, which is to be regarded as the origin of (G) (ignoring heave so that the x-y-plane of (G) is on the surface of the sea), or (3) NULL, implying that the origin be put to the mid point of the vessel posistions. |

`xlab` |
is the label for the x axis. |

`ylab` |
is the label for the y axis. |

`zlab` |
is the label for the z axis. |

`edge.vpos` |
defines the placement of the vessel position, where edge.vpos="x-+" places the vessel position information on the upper south edge of the plot. |

`line.vpos` |
adjusts the position of the text by the given number of lines |

`at.vpos` |
adjusts the position left/right (see mtext3d()). |

`cex.vpos` |
is the character expansion of the vessel information. |

`col.vpos` |
is the color for the vessel position information. |

`clock` |
is the position of the clock timing the frames, either given as a vector of length 3 representing the coordinates of the clock, as FALSE for no clock, or as one of |

`cex.clock` |
is the numeric character expansion value for the clock. |

`adj.clock` |
is used in text3d() when plotting the date and time. |

`format.clock` |
is the format of the date and time, specified as the input to utim2ftim(). Default is "yyyy-mm-dd\nHH:MM:SS.FFF" resulting in date and time separated by a line break of width according to the value of 'lsp.clock'. All "\n" apparing in 'format.clock' cause a line break. |

`digits.clock` |
is a numeric specifying the number of digits of the seconds part of the time. |

`lsp.clock` |
is the spacing factor for the line break, given as a multiple of the corresponding x-, y- or zlim. Default is 0.04. |

`col.clock` |
is the color of the plotted time and date. |

`sonar.grid` |
is a string representing whether to plot the sonar grid as a projection onto the surface ("proj"), as a grid around the sonar volume ("frame") or no grid (""). |

`sonar.grid.col` |
is a vector of two strings specifying the color to use for plotting the sonar grid edges, where the first is the main color, and the second is the color to use for lines that are above the plotting frame, but that are plotted onto the top of the frame. |

`sonar.grid.lwd` |
is the line width of the sonar grid. |

`cs.pos` |
defines the coordinate system to use when generating the points. Given as one of "g" or "v" representing the global coordinate and the coordinate system of the vessel. If given as a three element vector, 'cs.pos' is interpreted as c(cs.pos,cs.view,cs.xyzlim). |

`cs.view` |
defines the coordinate system to use when specifying the view point. Given as one of "g" or "v" representing the global coordinate and the coordinate system of the vessel. |

`sides` |
is a vector of two strings specifying on which sides of the sonar volume to plot edges of the beams and bows, respectively, where "t" is "top", "r" is "right", "b" is "bottom" and "l" is "left". |

`dens` |
is a vector of 4 elements specifying |

`every` |
(used in plot_volume.ME70()) is a single integer representing that the frame should be plotted every 'every' time step, where the first and last are included, or a vector of integers givint the time steps for which the frame should be plotted (not including the first and last time step). |

`global.grid` |
is the spacing between the gridlines of the global grid, plotted if 'global.grid' is not FALSE or empty. If global.grid==TRUE, the grid width is set to 100. |

`global.grid.lwd` |
is the line width of the global grid lines. |

`global.grid.lty` |
is the line type of the global grid lines. |

`...` |
are inputs passed on to add.sonar.grid(), pplot3d.TSD, and decorate3d(). Also the direction of the light source in the plot is given here by the variables 'theta' and 'phi' (see rgl.light, default is to clear the light source). To set color and character size of labels and axis annotation, use cex.lab, cex.axis, col.lab and col.axis. |

`cpplot3d_type` |
is "c" for cplot3d.event() and "p" for pplot3d.event(). |

`N` |
is the approximate number of points plotted. |

`acca` |
is the acoustic scattering cross sectional area (assuming omnidirectional targets). Overriding 'N' if given. |

`fun` |
is the name of the funciton used for obtaining the number of points in each voxel by "rounding off" to integers. The string given in 'fun' must be the name of a function taking 'x' as the input, such as "floor", "round", "ceiling" and "mod", where the last function is defined in sv2pos() and draws between floor(x) and ceiling(x) with probability P(ceiling(x))=x%%1. Also, there is the option of adding a numeric to "mod", such as "mod3" or "mod4.2", to indicate that all voxels with number of points below the given numeric, are set to zero. |

`allert` |
is the limit of the number of points inducing a warning asking the user to continue. Default is NULL, indicating no check for the number of points to be generated. |

`nlim` |
is a vector of limits for the number of points, dividing the voxels into classes in which the number of points are reduced by the values specified in 'fact'. If nlim==NULL, the default values are set in pplot3d.set.default.nlim() depending on whether the acoustical instrument is a sonar (nlim = 30^(1:5)) or an echosounder (nlim = 50^(1:4)) (for echosounders the bottom echo may require larger values of 'nlim'). Note that 0 is added to the head of 'nlim', representing the unchnaged class of points which should not be changed in number. Thus, if nlim=100, the voxels containing less than 100 points are assigned to the first level, and voxels with 100 points or more are assigned to the second level. The values nlim=Inf and nlim=0 imply only one class, which is also achieved by setting 'cols' to only one color. |

`fact` |
is either NULL, indicating that fact=1/sqrt(nlim), or the factor by which to scale the number of points in voxels exceeding the value of 'nlim'. If 'fact' has length shorter than 'nlim', the first value is used as a base in fact = fact[1]^(1:length(nlim)). As for 'nlim', 'fact' is added 1 to the head, indicating no scaling of the number of points in the voxels in the first level. 'fact' can also be given as a function, in which case the function recreating the default factors is function(x) x^(-1/2), whereas function(x) x^(-2/3) would reduce the number of points plotted. |

`cols` |
is a vector specifying the colors of the points in the different levels. Differing from 'nlim' and 'fact', the color vector must include also the basic class of voxels starting from one point in each voxel. If the length of 'cols' is shorter than 'nlim' or 'fact', these are cropped to the length of 'cols' after 0 is added to 'nlim' and 1 is added to 'fact'. Thus, specifying cols=2 sets all points to red, and applies no classes for the voxels. |

`stretch` |
is used to stretch the voxels of the ME70 multibeam echosounder in the direction of motion, so that space in between voxels is smoothed out. If given as a two element vector, the first element sets the stretching factor applied at the depth given by the second element. This results in attemptedly constant stretching for all depths. |

`possample` |
is used to select a sample of the regenerated points to plot, used when all points are at the same level og TS, and the number of points should be reduced in the plot but not in the data. |

`schoolnumt` |
is the number of time steps of the school, specified if the school data has been recycled and thus should be recycled when plotting as well. |

`light` |
sets the angle of the rgl light source, given as c(azimuth angel, elevation angle) (default is no light source, light = NULL). |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.