View source: R/cpplot3d.decorate.R

Plots bounding box, titles, axes, vessel positions, date and time, sonar grid, and global grid to pplot.TSD()/pplot3d.event or cplot.TSD()/cplot3d.event.

1 2 3 4 5 6 7 8 9 10 11 | ```
cpplot3d.decorate(data = NULL, plot = TRUE, aspect = "iso",
xyzlim = NULL, 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, ...)
``` |

`data` |
is a list containing "utim", "dira", "dire", "asps", "sint", "lenb", "psxv", "psyv", "pszv", "psze", and "rtzv". |

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

`xyzlim` |
is a three column matrix of two rows, where the first column represents the plotting range of x-values and the second and third for the y- and z-values. |

`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. |

`full.box` |
is FALSE (default) to make the bounding box in front of the data invisible, and TRUE ot make the full bounding box visible. |

`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(). |

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

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.