Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Jun 13, 2024
1 parent 57a83ff commit c94089c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ NULL
#' @export
#' @method plot CompositionMatrix
plot.CompositionMatrix <- function(x, ..., margin = NULL, groups = get_groups(x)) {
if (!is.null(groups) || !all(is.na(groups))) {
if (!is.null(groups) && !all(is.na(groups))) {
col <- dimensio::palette_color_discrete(list(...)$col)(groups)
pch <- dimensio::palette_shape(list(...)$pch)(groups)
} else {
col <- list(...)$col %||% graphics::par("col")
pch <- list(...)$pch %||% graphics::par("pch")
}

isopleuros::ternary_pairs(x, margin = margin, col = col, pch = pch, ...)
invisible(x)
}
Expand Down

0 comments on commit c94089c

Please sign in to comment.