From c94089c4d66ca63daec67cd9df6da25e4fa7bb01 Mon Sep 17 00:00:00 2001 From: nfrerebeau Date: Thu, 13 Jun 2024 17:00:21 +0200 Subject: [PATCH] Small fix --- R/plot.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/plot.R b/R/plot.R index aeda14d..4e31e3f 100644 --- a/R/plot.R +++ b/R/plot.R @@ -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) }