Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeaudette committed Oct 16, 2024
1 parent 97ca179 commit dad4b70
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 3 additions & 3 deletions R/addVolumeFraction.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
#' @title Symbolize Volume Fraction within a Soil Profile Collection Plot
#'
#' @description Symbolize volume fraction on an existing soil profile collection plot.
#'
#' @note It may be necessary to adjust both `res`, `cex.min`, and `cex.max` for optimal legibility.
#'
#' @param x a `SoilProfileCollection` object
#' @param colname character vector of length 1, naming the column containing volume fraction data (horizon-level attribute). Values should be within 0-100 percent.
Expand All @@ -68,9 +70,7 @@
#'
#' @export
#'


## TODO: symbol size must be controlled by `res`
#'
addVolumeFraction <- function(x, colname, res = 10, cex.min = 0.1, cex.max = 0.5, pch = 1, col = 'black') {

# color should be either:
Expand Down
3 changes: 3 additions & 0 deletions man/addVolumeFraction.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions misc/sandbox/morphologic-grid/2024-reboot.R
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,13 @@ library(aqp)
# plot: graphical sanity check on results
initHzDepthFunctions <- function(hz, plot = TRUE) {

# number of horizons
n <- nrow(hz)

# plot colors

# generate a depth function for each horizon template
p <- lapply(seq_along(1:nrow(hz)), function(i) {
p <- lapply(1:n, function(i) {
zapsmall(
# work at depth interval mid points
dnorm(z.i + (dz / 2), mean = hz$m[i], sd = hz$sd[i])
Expand All @@ -202,7 +207,8 @@ initHzDepthFunctions <- function(hz, plot = TRUE) {
x = z.i,
y = pp,
type = 'b',
pch = 1,
pch = 1,
lwd = 1.5,
cex = 0.5,
xlab = 'Depth (cm)',
ylab = 'Pr(H | depth)',
Expand Down Expand Up @@ -330,7 +336,7 @@ p <- initHzDepthFunctions(hz)


## simulation
n.profiles <- 8
n.profiles <- 10
pIDs <- sprintf("p%02d", 1:n.profiles)

s <- lapply(1:n.profiles, function(i) {
Expand Down

0 comments on commit dad4b70

Please sign in to comment.