# NOT RUN {
data(sp1)
# usually best to adjust margins
par(mar=c(0,0,3,0))
# add color vector
sp1$soil_color <- with(sp1, munsell2rgb(hue, value, chroma))
# promote to SoilProfileCollection
depths(sp1) <- id ~ top + bottom
# plot profiles
plot(sp1, id.style='side')
# title, note line argument:
title('Sample Data 1', line=1, cex.main=0.75)
# plot profiles without horizon-line divisions
plot(sp1, divide.hz=FALSE)
# add dashed lines illustrating horizon boundary distinctness
sp1$hzD <- hzDistinctnessCodeToOffset(sp1$bound_distinct)
plot(sp1, hz.distinctness.offset='hzD')
# plot horizon color according to some property
data(sp4)
depths(sp4) <- id ~ top + bottom
plot(sp4, color='clay')
# another example
data(sp2)
depths(sp2) <- id ~ top + bottom
site(sp2) <- ~ surface
# label with site-level attribute: `surface`
plot(sp2, label='surface', plot.order=order(sp2$surface))
# example using a categorical attribute
plot(sp2, color = "plasticity")
# plot two SPC objects in the same figure
par(mar=c(1,1,1,1))
# plot the first SPC object and
# allocate space for the second SPC object
plot(sp1, n=length(sp1) + length(sp2))
# plot the second SPC, starting from the first empty space
plot(sp2, x.idx.offset=length(sp1), add=TRUE)
# }
Run the code above in your browser using DataLab