R/ternary_box.R

Defines functions ternary_box

Documented in ternary_box

# TERNARY BOX
#' @include AllGenerics.R
NULL

#' @export
#' @rdname ternary_box
ternary_box <- function(lty = "solid", ...) {

  ## Graphical parameters
  col <- list(...)$col %||% graphics::par("fg")
  lwd <- list(...)$lwd %||% 1

  graphics::polygon(x = c(0, 0.5, 1), y = c(0, .top, 0),
                    border = col, lty = lty, lwd = lwd)

  invisible(NULL)
}

Try the isopleuros package in your browser

Any scripts or data that you put into this service are public.

isopleuros documentation built on April 3, 2025, 7:40 p.m.