Skip to content

Commit

Permalink
clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeaudette committed Aug 31, 2023
1 parent 284c2a7 commit 6fd593c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 16 deletions.
15 changes: 14 additions & 1 deletion AQP/aqp/sketches.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,15 @@ Sometimes you need details from a sketch for further annotation; profile orderin
```{r fig.width=10, fig.height=5}
# re-order by max profile depth
# note this is not the same as soil depth (e.g. to contact)
# compute bottom-most horizon depth
.depths <- profileApply(osds, max)
# or, use [-style indexing and keywords
# "last horizon of each profile" and "bottom depth"
.depths <- osds[, , .LAST, .BOTTOM]
# shallow -> deep ordering
.order <- order(.depths)
# make a sketch
Expand All @@ -779,7 +787,12 @@ lastPP <- get("last_spc_plot", envir = aqp.env)
str(lastPP)
# use plot order (from metadata) to annotate
text(x = seq_along(osds), y = .depths[.order] + 5, labels = .depths[.order], cex = 0.55)
text(
x = seq_along(osds),
y = .depths[lastPP$plot.order] + 5,
labels = .depths[lastPP$plot.order],
cex = 0.55
)
```


Expand Down
Loading

0 comments on commit 6fd593c

Please sign in to comment.