diff --git a/R/mcmc-distributions.R b/R/mcmc-distributions.R index 07a1951a..c21d286f 100644 --- a/R/mcmc-distributions.R +++ b/R/mcmc-distributions.R @@ -394,7 +394,7 @@ mcmc_violin <- function( set_hist_aes(freq), fill = get_color("mid"), color = get_color("mid_highlight"), - size = .25, + linewidth = .25, na.rm = TRUE, binwidth = binwidth, bins = bins, diff --git a/R/ppc-errors.R b/R/ppc-errors.R index 1bf17b65..510e95f9 100644 --- a/R/ppc-errors.R +++ b/R/ppc-errors.R @@ -134,7 +134,7 @@ ppc_error_hist <- geom_histogram( fill = get_color("l"), color = get_color("lh"), - size = 0.25, + linewidth = 0.25, binwidth = binwidth, bins = bins, breaks = breaks diff --git a/R/ppd-distributions.R b/R/ppd-distributions.R index bbf67218..7c868311 100644 --- a/R/ppd-distributions.R +++ b/R/ppd-distributions.R @@ -168,7 +168,7 @@ ppd_hist <- fill = "ypred" )) + geom_histogram( - size = 0.25, + linewidth = 0.25, binwidth = binwidth, bins = bins, breaks = breaks diff --git a/tests/testthat/test-mcmc-traces.R b/tests/testthat/test-mcmc-traces.R index 62d46c88..86679647 100644 --- a/tests/testthat/test-mcmc-traces.R +++ b/tests/testthat/test-mcmc-traces.R @@ -51,7 +51,11 @@ test_that("mcmc_trace options work", { expect_equal(g1$coordinates$limits$x, c(5, 10)) expect_gg(g2 <- mcmc_trace(arr, regex_pars = "beta", n_warmup = 10)) - ll <- g2$labels + if ("get_labs" %in% getNamespaceExports("ggplot2")) { + ll <- ggplot2::get_labs(g2) + } else { + ll <- g2$labels + } expect_true(all(c("xmin", "xmax", "ymin", "ymax") %in% names(ll))) expect_error(mcmc_trace(arr, iter1 = -1))