From f25ad7012d3397a943785d50d2e8d87bc5c1a848 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Thu, 30 Jan 2025 14:40:44 +0100 Subject: [PATCH 1/2] fix test --- tests/testthat/test-mcmc-traces.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)) From 35a968186c35121a58c603368685aec9086cea16 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Thu, 30 Jan 2025 14:47:09 +0100 Subject: [PATCH 2/2] replace deprecated aesthetic --- R/mcmc-distributions.R | 2 +- R/ppc-errors.R | 2 +- R/ppd-distributions.R | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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