Skip to content

Commit 9293196

Browse files
committed
update expansion like mcmc_areas
avoids too much space but also avoids cutting off the top
1 parent 6d5bfdc commit 9293196

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

R/mcmc-intervals.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,10 @@ mcmc_areas_ridges <- function(x,
533533
aes_(x = ~ x, y = ~ parameter) +
534534
layer_outer +
535535
scale_y_discrete(limits = unique(rev(data$parameter)),
536-
expand = c(0.05, .6)) +
536+
expand = expansion(
537+
add = c(0, 1 + 1/(2 * nlevels(data$parameter))),
538+
mult = c(.1, .1)
539+
)) +
537540
layer_list_inner +
538541
layer_vertical_line +
539542
scale_fill_identity() +

0 commit comments

Comments
 (0)