View source: R/vizTerracePosition.R
| vizTerracePosition | R Documentation |
This function creates a graphical summary of geomorphic position proportions, as returned by soilDB::fetchOSD(..., extended = TRUE). Stacked barplots are arranged according to an expected hydrologic gradient from "higher" to "lower" relative positions in a theoretical landscape.
Example geomorphic position data:
| series | Tread | Riser | n | shannon_entropy |
| CAPSHAW | 0.974 | 0.026 | 39 | 0.172 |
| GUTHRIE | 1.000 | 0.000 | 86 | 0.000 |
| LEE | 1.000 | 0.000 | 42 | 0.000 |
| LOBELVILLE | 1.000 | 0.000 | 26 | 0.000 |
| TAFT | 1.000 | 0.000 | 90 | 0.000 |
| TARKLIN | 0.660 | 0.340 | 53 | 0.924 |
| TRACE | 1.000 | 0.000 | 12 | 0.000 |
vizTerracePosition(
x,
s = NULL,
annotations = TRUE,
annotation.cex = 0.75,
clust = TRUE,
dend.size = 5,
dend.type = c("rectangle", "triangle"),
cols = c("#5d74a5", "#fef7c7"),
...
)
x |
|
s |
an optional soil series name, highlighted in the figure |
annotations |
logical, add number of record and normalized Shannon entropy values |
annotation.cex |
annotation label scaling factor |
clust |
logical, order rows using divisive hierarchical clustering and include dendrogram? |
dend.size |
numeric, space reserved for dendrogram when |
dend.type |
character, one of 'rectangle' or 'triangle', when |
cols |
vector of colors |
... |
additional arguments to |
See the Soil Series Query Functions tutorial for more information. In the presence of ties within x, a small amount of jittering is applied to proportions to assist with the hydrologic ordering step (only when clust = TRUE).
A list with the following elements:
fig: lattice object (the figure)
order: 1D ordering from cluster::diana
clust: hclust object
match.rate: fraction of series matching target hydrologic ordering, after clustering + rotation
Default colors are from PNWColors::pnw_palette('Shuksan2'). Original colors: c("#2B83BA", "#FDAE61")
D.E. Beaudette
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.