https://github.com/cran/aqp
Revision 01117710b462f4328b6f6f5f775726d27d3730da authored by Dylan Beaudette on 24 September 2018, 19:40:03 UTC, committed by cran-robot on 24 September 2018, 19:40:03 UTC
1 parent 1880825
Raw File
Tip revision: 01117710b462f4328b6f6f5f775726d27d3730da authored by Dylan Beaudette on 24 September 2018, 19:40:03 UTC
version 1.16-3
Tip revision: 0111771
panel.depth_function.Rd
\name{panel.depth_function}
\Rdversion{1.1}
\alias{panel.depth_function}
\alias{prepanel.depth_function}
\alias{make.segments}

\title{Lattice Panel Function for Soil Profiles}

\description{Panel function for plotting grouped soil property data, along with upper and lower estimates of uncertainty.}

\usage{
panel.depth_function(x, y, id, upper = NA, lower = NA, 
subscripts = NULL, groups = NULL, sync.colors=FALSE, cf=NA, 
cf.col=NA, cf.interval=20, ...)
}

\arguments{
  \item{x}{x values (generated by calling lattice function)}
  \item{y}{y values (generated by calling lattice function)}
  \item{id}{vector of id labels, same length as x and y--only required when plotting segments (see Details section)}
  \item{upper}{vector of upper confidence envelope values}
  \item{lower}{vector of lower confidence envelope values}
  \item{subscripts}{paneling indices (generated by calling lattice function)}
  \item{groups}{grouping data (generated by calling lattice function)}
  \item{sync.colors}{optionally sync the fill color within the region bounded by (lower--upper) with the line colors}
  \item{cf}{optionally annotate contributing fraction data at regular depth intervals see \code{\link{slab}}}
  \item{cf.col}{optionall color for contributing fraction values, typically used to override the line color}
  \item{cf.interval}{number of depth units to space printed contributing fraction values}
  \item{\dots}{further arguments to lower-level lattice plotting functions, see below}
}
\details{
This function can be used to replace \code{panel.superpose} when plotting depth function data. When requested, contributing fraction data are printed using colors the same color as corresponding depth function lines unless a single color value is given via \code{cf.col}.
}

\references{http://casoilresource.lawr.ucdavis.edu/}
\author{Dylan E. Beaudette}

\seealso{ \code{\link{sp1}}, \code{\link{slice}}, \code{\link{slab}}}
\examples{
library(lattice)
data(sp1)

# 1. plotting mechanism for step-functions derived from soil profile data
xyplot(cbind(top,bottom) ~ prop, data=sp1,id=sp1$id,
panel=panel.depth_function, ylim=c(250,-10), 
scales=list(y=list(tick.number=10)), xlab='Property', 
ylab='Depth (cm)', main='panel.depth_function() demo'
)

# 1.1 include groups argument to leverage lattice styling framework
sp1$group <- factor(sp1$group, labels=c('Group 1', 'Group2'))

xyplot(cbind(top,bottom) ~ prop, groups=group, data=sp1, id=sp1$id,
panel=panel.depth_function, ylim=c(250,-10), 
scales=list(y=list(tick.number=10)), xlab='Property', 
ylab='Depth (cm)', main='panel.depth_function() demo',
auto.key=list(columns=2, points=FALSE, lines=TRUE),
par.settings=list(superpose.line=list(col=c('Orange','RoyalBlue')))
)


}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{hplot}
back to top