From 4a1ca3863ddc2fa6f9298c011bd94c6add2b8916 Mon Sep 17 00:00:00 2001 From: Beaudette Date: Mon, 25 Sep 2023 14:45:21 -0700 Subject: [PATCH] new ideas --- misc/sandbox/warp.R | 10 +++++----- misc/sandbox/wn2color.R | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/misc/sandbox/warp.R b/misc/sandbox/warp.R index 68550d5cc..e4cc9c1b7 100644 --- a/misc/sandbox/warp.R +++ b/misc/sandbox/warp.R @@ -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 @@ -85,8 +85,8 @@ 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) @@ -94,9 +94,9 @@ 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') diff --git a/misc/sandbox/wn2color.R b/misc/sandbox/wn2color.R index 7d314eb7b..af7d898d7 100644 --- a/misc/sandbox/wn2color.R +++ b/misc/sandbox/wn2color.R @@ -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')