diff --git a/R/plot.binned_residuals.R b/R/plot.binned_residuals.R index bbbfc8956..2c6aef930 100644 --- a/R/plot.binned_residuals.R +++ b/R/plot.binned_residuals.R @@ -17,6 +17,11 @@ plot.see_binned_residuals <- function(x, # set defaults term <- attr(x, "term", exact = TRUE) + if (is.null(dots[["show_dots"]])) { + show_dots <- isTRUE(attr(x, "show_dots", exact = TRUE)) + } else { + show_dots <- isTRUE(dots[["show_dots"]]) + } if (missing(style) && !is.null(attr(x, "theme"))) { theme_style <- unlist(strsplit(attr(x, "theme"), "::", fixed = TRUE)) @@ -36,7 +41,7 @@ plot.see_binned_residuals <- function(x, } # show or hide dots - may be useful for large models with many observations - if (!isTRUE(dots[["show_dots"]]) && insight::n_unique(x$group) > 1) { + if (!show_dots && insight::n_unique(x$group) > 1) { x$ybar[x$group == "yes"] <- NA x$CI_low[x$group == "yes"] <- NA x$CI_high[x$group == "yes"] <- NA