Description Usage Arguments Details Value Examples
Build a conventional "depth down" ggplot2 line graphic for repeated depth
profile data.
1 | ptlines_old(.dt, .val, .y, .grp, .sort = TRUE, ...)
|
.dt |
Data frame containing data to plot. Can be NULL, if all data vectors are found in the enclosing environment. |
.val |
Value that defines the x coordinate of the plot. Usually a measured quantity. Either a numeric vector or name of a numeric vector from the source data frame (unquoted or quoted) |
.y |
Value that defines the (reversed) y coordinate of the plot. Usually the depth coordinate. Can be either a numeric vector or the name of a numeric vector in source data frame (unquoted or quoted) |
.grp |
Factor or character vector, name of a factor or character vector in the source data frame, or an expression that evaluates (with data masking) to a character or factor vector. Usually a date. |
.sort |
TRUE / FALSE. Should data be sorted by .y variable before plotting? This is almost always what you want to generate clean traces for each profile. |
... |
Other arguments to pass to |
Depth profiles are drawn as lines, with depth on a reversed vertical axis, so that zero is at the top and depth increases downward. Values of a measured variable increase along the X axis. Multiple profiles (often dates or times) are drawn as separate lines, coded by color. The argument that defines those groups should be a factor or character vector.
The function's first parameter is a data frame, and it produces a ggplot2
plot object, so can be integrated into ggplot2 andtidyverse work flows.
A ggplot object (S3 class defined by ggplot2)
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.