Learn R Programming

aqp (version 0.85)

profile_plot.default: Profile Plot

Description

Generate a simple diagram of a soil profile, with annotated horizon names.

Usage

## S3 method for class 'SoilProfileList':
profile_plot(d, color = "soil_color", width = 0.2, 
cex.names = 0.5, plot.order = 1:d$num_profiles, add = FALSE,
scaling.factor = 1, y.offset = 0, max.depth = d$max_depth, \dots)

Arguments

d
a SoilProfileList object
color
the name of the column containing R-compatible color descriptions
width
scaling of profile widths
cex.names
character scaling applied to horizon names
plot.order
a vector describing the order in which individual SoilProfile objects from the parent should be plotted
add
add to an existing figure
scaling.factor
vertical scaling of the profile heights
y.offset
vertical offset for top of profiles
max.depth
lower depth boundary of plot
...
other arguments passed into lower level plotting functions

Value

  • A new plot of soil profiles is generated, or optionally added to an existing plot.

Details

This function sets the margins before plotting, so previous calls to par(mar=...) will be overridden.

References

http://casoilresource.lawr.ucdavis.edu/

See Also

initProfileList

Examples

Run this code
library(aqp)
data(sp1)

# add color vector
sp1$soil_color <- with(sp1, munsell2rgb(hue, value, chroma))

# convert to SoilPofileList class object
sp1.list <- initProfileList(sp1)

# plot profiles
profile_plot(sp1.list)

Run the code above in your browser using DataLab