Skip to content

Commit

Permalink
adding import, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeaudette committed Aug 12, 2023
1 parent cf67eb1 commit bd364a4
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ importFrom(graphics,abline)
importFrom(graphics,arrows)
importFrom(graphics,axis)
importFrom(graphics,box)
importFrom(graphics,grconvertX)
importFrom(graphics,grid)
importFrom(graphics,image)
importFrom(graphics,legend)
Expand Down
2 changes: 1 addition & 1 deletion R/aqp-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#' @keywords package
#' @import data.table
#' @importFrom grDevices chull col2rgb colorRamp colorRampPalette colors convertColor grey hsv rgb rgb2hsv
#' @importFrom graphics abline arrows axis box grid image legend lines mtext par points polygon rect segments strheight strwidth text
#' @importFrom graphics abline arrows axis box grid image legend lines mtext par points polygon rect segments strheight strwidth text grconvertX
#' @importFrom methods setClass setOldClass representation prototype new isGeneric setGeneric setReplaceMethod setMethod .hasSlot as new slot slot<- slotNames
#' @importFrom stats TukeyHSD aggregate aov approxfun as.dist as.formula cmdscale complete.cases dist formula median model.frame na.omit na.pass quantile rnorm runif sd splinefun terms update weighted.mean
#' @importFrom utils object.size packageVersion
Expand Down
3 changes: 2 additions & 1 deletion R/plotSPC.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#' @param hz.depths.lines logical, draw segments between horizon depth labels and actual horizon depth; this is useful when including horizon boundary distinctness and/or `fixLabelCollisions = TRUE`
#'
#' @param depth.axis logical or list. Use a logical to suppress (`FALSE`) or add depth axis using defaults (`TRUE`). Use a list to specify one or more of:
#' - `style`: 'compact', 'traditional'
#' - `style`: 'traditional', 'compact', 'tape'
#' - `line`: numeric, negative values move axis to the left
#' - `cex`: scaling applied to entire depth axis
#' - `interval`: axis interval
Expand Down Expand Up @@ -1592,6 +1592,7 @@ plotSPC <- function(
depth_axis_labels <- paste(depth_axis_intervals, depth_units(x))

# draw axis
# pass-in `n` (number of profiles or horizontal space) for placement of 'tape' style
.drawDepthAxis(
style = depth.axis[['style']],
.at = depth_axis_tick_locations,
Expand Down
11 changes: 11 additions & 0 deletions R/sketch-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@



#' @title Draw a depth axis along side soil profile sketches
#'
#' @param style character, depth axis style
#' @param .at numeric vector, depth axis annotation coordinates
#' @param .labels character vector, tick mark labels
#' @param .line numeric, line offset for horizontal placement of axis
#' @param .cex numeric, scaling factor for axis
#' @param .n integer, horizontal space allocated for profile sketches (used for placement of 'tape' style depth axis)
#'
#' @noRd
#' @return nothing, low-level plotting function
.drawDepthAxis <- function(style = c('compact', 'traditional', 'tape'), .at, .labels, .line, .cex, .n) {

# launder / check style
Expand Down
2 changes: 1 addition & 1 deletion man/SoilProfileCollection-plotting-methods.Rd

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

4 changes: 2 additions & 2 deletions man/profileGroupLabels.Rd

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

0 comments on commit bd364a4

Please sign in to comment.