diff --git a/R/ggmice.R b/R/ggmice.R index 3ab1862e..9df68d89 100644 --- a/R/ggmice.R +++ b/R/ggmice.R @@ -119,6 +119,10 @@ ggmice <- function(data = NULL, ) mice_mapping <- utils::modifyList(mapping, ggplot2::aes(colour = .where)) + if (is.null(mapping$group)) { + mice_mapping <- + utils::modifyList(mice_mapping, ggplot2::aes(group = .imp)) + } mice_colors <- c("observed" = "#006CC2B3", "imputed" = "#B61A51B3")