Skip to content

Commit

Permalink
new ideas
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeaudette committed Sep 25, 2023
1 parent 71821b6 commit 4a1ca38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions misc/sandbox/warp.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ library(soilDB)
# https://www.fao.org/3/cb0509en/CB0509EN.pdf


#' @title Inflate/Deflate Horizon Thickness
#' @title Inflate / Deflate Horizon Thickness
#'
#' @param x a `SoilProfileCollection` object
#' @param fact numeric or character; warping factor specified as a single numeric value, vector of numeric values (length = nrow(x)), or column name of a horizon level attribute containing numeric values
Expand Down Expand Up @@ -85,18 +85,18 @@ x <- combine(o, oo)
.y2 <- x[2, , .TOP]

par(mar = c(1, 0, 0 , 2))
plotSPC(x, name.style = 'center-center', cex.names = 0.8, width = 0.2, max.depth = 200)
arrows(x0 = 1 + 0.2, y0 = .y1, x1 = 2 - 0.2, y1 = .y2, len = 0.1, col = 2)
plotSPC(x, name.style = 'center-center', cex.names = 0.8, width = 0.2, max.depth = 200, depth.axis = list(line = -3))
arrows(x0 = 1 + 0.25, y0 = .y1, x1 = 2 - 0.25, y1 = .y2, len = 0.1, col = 2)



o$fact <- c(1, 1, 1, 1, 1, 1, 1, 1)
oo$fact <- c(1.8, 1.3, 0.6, 0.75, 0.8, 1, 1, 1)
x <- combine(o, oo)

par(mar = c(1, 0, 3 , 2))
par(mar = c(1, 0, 3 , 1))
plotSPC(x, name.style = 'center-center', cex.names = 0.8, width = 0.2, max.depth = 200, depth.axis = FALSE, hz.depths = TRUE, color = 'fact')
arrows(x0 = 1 + 0.2, y0 = .y1, x1 = 2 - 0.2, y1 = .y2, len = 0.1, col = 'grey')
arrows(x0 = 1 + 0.33, y0 = .y1, x1 = 2 - 0.22, y1 = .y2, len = 0.1, col = 'black')



2 changes: 1 addition & 1 deletion misc/sandbox/wn2color.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
library(aqp)
library(gifski)

?spec2Munsell
# ?spec2Munsell
cols <- c('10YR 6/2', '5YR 5/6', '10B 4/4')
res <- mixMunsell(cols, keepMixedSpec = TRUE, mixingMethod = 'reference')

Expand Down

0 comments on commit 4a1ca38

Please sign in to comment.