Description Usage Arguments Details Author(s) Examples
View source: R/aggregateColorPlot.R
Generate a plot from summaries generated by aqp::aggregateColor().
1 2 3 | aggregateColorPlot(x, print.label=TRUE, label.font = 1,
label.cex = 0.65, buffer.pct = 0.02, print.n.hz=FALSE,
rect.border='black', horizontal.borders=FALSE, ...)
|
x |
a list, results from |
print.label |
print Munsell color labels inside of rectangles, when they fit |
label.font |
font specification for color labels |
label.cex |
font size for color lables |
buffer.pct |
extra space between labels and color rectangles |
print.n.hz |
optionally print the number of horizons |
rect.border |
color for rectangle border |
horizontal.borders |
optionally add horizontal borders between bands of color |
... |
additional arguments passed to plot |
See examples.
D.E. Beaudette
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
data(loafercreek, package = 'soilDB')
# generalize horizon names using REGEX rules
n <- c('Oi', 'A', 'BA','Bt1','Bt2','Bt3','Cr','R')
p <- c('O', '^A$|Ad|Ap|AB','BA$|Bw',
'Bt1$|^B$','^Bt$|^Bt2$','^Bt3|^Bt4|CBt$|BCt$|2Bt|2CB$|^C$','Cr','R')
loafercreek$genhz <- generalize.hz(loafercreek$hzname, n, p)
# remove non-matching generalized horizon names
loafercreek$genhz[loafercreek$genhz == 'not-used'] <- NA
loafercreek$genhz <- factor(loafercreek$genhz)
# aggregate color data, this function is from the `aqp` package
a <- aggregateColor(loafercreek, 'genhz')
# plot
par(mar=c(1,4,4,1))
aggregateColorPlot(a, print.n.hz = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.