Skip to content

Commit 09ff64d

Browse files
committed
Make mcmc_pairs() return a ggplot object instead of a bayesplot_group object (Fix stan-dev#268)
1 parent 96105e2 commit 09ff64d

7 files changed

+478
-176
lines changed

NEWS.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
Items for next release go here
66

7+
### Breaking changes
8+
9+
* `mcmc_pairs()` now returns a ggplot object rather than a `bayesplot_grid`
10+
object. Code that modified the output of `mcmc_pairs()` will need to change.
11+
(#268, @billdenney)
712

813
# bayesplot 1.8.0
914

R/mcmc-distributions.R

+3-6
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,8 @@ mcmc_violin <- function(x,
323323
n_param <- num_params(data)
324324

325325
graph <- ggplot(data, aes(x = ~ value)) +
326-
geom_histogram(
327-
set_hist_aes(freq),
328-
fill = get_color("mid"),
329-
color = get_color("mid_highlight"),
330-
size = .25,
331-
na.rm = TRUE,
326+
geom_mcmc_hist(
327+
freq = freq,
332328
binwidth = binwidth,
333329
breaks = breaks
334330
)
@@ -450,3 +446,4 @@ mcmc_violin <- function(x,
450446
yaxis_title(on = n_param == 1 && violin) +
451447
xaxis_title(on = n_param == 1)
452448
}
449+

0 commit comments

Comments
 (0)