Skip to content

Commit 7f45740

Browse files
authored
Merge pull request #337 from teunbrand/ggplot2_360
Compatibility with ggplot2 3.6.0
2 parents a0b9e7e + abfc2ee commit 7f45740

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

R/mcmc-distributions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ mcmc_violin <- function(
394394
set_hist_aes(freq),
395395
fill = get_color("mid"),
396396
color = get_color("mid_highlight"),
397-
size = .25,
397+
linewidth = .25,
398398
na.rm = TRUE,
399399
binwidth = binwidth,
400400
bins = bins,

R/ppc-errors.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ ppc_error_hist <-
134134
geom_histogram(
135135
fill = get_color("l"),
136136
color = get_color("lh"),
137-
size = 0.25,
137+
linewidth = 0.25,
138138
binwidth = binwidth,
139139
bins = bins,
140140
breaks = breaks

R/ppd-distributions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ ppd_hist <-
168168
fill = "ypred"
169169
)) +
170170
geom_histogram(
171-
size = 0.25,
171+
linewidth = 0.25,
172172
binwidth = binwidth,
173173
bins = bins,
174174
breaks = breaks

tests/testthat/test-mcmc-traces.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ test_that("mcmc_trace options work", {
5151
expect_equal(g1$coordinates$limits$x, c(5, 10))
5252

5353
expect_gg(g2 <- mcmc_trace(arr, regex_pars = "beta", n_warmup = 10))
54-
ll <- g2$labels
54+
if ("get_labs" %in% getNamespaceExports("ggplot2")) {
55+
ll <- ggplot2::get_labs(g2)
56+
} else {
57+
ll <- g2$labels
58+
}
5559
expect_true(all(c("xmin", "xmax", "ymin", "ymax") %in% names(ll)))
5660

5761
expect_error(mcmc_trace(arr, iter1 = -1))

0 commit comments

Comments
 (0)