@@ -245,6 +245,8 @@ mcmc_intervals <- function(x,
245
245
246
246
# ' @rdname MCMC-intervals
247
247
# ' @export
248
+ # ' @param size For `mcmc_areas()` and `mcmc_areas_ridges()`, the size of the
249
+ # ' ridgelines.
248
250
mcmc_areas <- function (x ,
249
251
pars = character (),
250
252
regex_pars = character (),
@@ -255,6 +257,7 @@ mcmc_areas <- function(x,
255
257
prob_outer = 1 ,
256
258
point_est = c(" median" , " mean" , " none" ),
257
259
rhat = numeric (),
260
+ size = NULL ,
258
261
bw = NULL ,
259
262
adjust = NULL ,
260
263
kernel = NULL ,
@@ -330,6 +333,12 @@ mcmc_areas <- function(x,
330
333
fill = NA
331
334
)
332
335
336
+ if (! is.null(size )) {
337
+ args_bottom $ size <- size
338
+ args_outer $ size <- size
339
+ args_inner $ size <- size
340
+ }
341
+
333
342
if (color_by_rhat ) {
334
343
args_bottom $ mapping <- args_bottom $ mapping %> %
335
344
modify_aes_(color = ~ rhat_rating )
@@ -401,6 +410,7 @@ mcmc_areas_ridges <- function(x,
401
410
... ,
402
411
prob_outer = 1 ,
403
412
prob = 1 ,
413
+ size = NULL ,
404
414
bw = NULL , adjust = NULL , kernel = NULL ,
405
415
n_dens = NULL ) {
406
416
check_ignored_arguments(... )
@@ -431,6 +441,9 @@ mcmc_areas_ridges <- function(x,
431
441
fill = NA ,
432
442
stat = " identity"
433
443
)
444
+ if (! is.null(size )) {
445
+ args_outer $ size <- size
446
+ }
434
447
435
448
layer_outer <- do.call(ggridges :: geom_density_ridges , args_outer )
436
449
0 commit comments