@@ -170,8 +170,8 @@ mcmc_rhat <- function(rhat, ..., size = NULL) {
170170 labs(y = NULL , x = expression(hat(R ))) +
171171 scale_fill_diagnostic(" rhat" ) +
172172 scale_color_diagnostic(" rhat" ) +
173- scale_x_continuous(breaks = brks , expand = c( 0 , .01 )) +
174- scale_y_discrete(expand = c( .025 ,0 )) +
173+ scale_x_continuous(breaks = brks , expand = expansion( mult = 0 , add = 0 .01 )) +
174+ scale_y_discrete(expand = expansion( mult = 0 .025 , add = 0 )) +
175175 yaxis_title(FALSE ) +
176176 yaxis_text(FALSE ) +
177177 yaxis_ticks(FALSE )
@@ -199,7 +199,7 @@ mcmc_rhat_hist <- function(rhat, ..., binwidth = NULL, bins = NULL, breaks = NUL
199199 scale_color_diagnostic(" rhat" ) +
200200 scale_fill_diagnostic(" rhat" ) +
201201 labs(x = expression(hat(R )), y = NULL ) +
202- dont_expand_y_axis(c( 0.005 , 0 )) +
202+ dont_expand_y_axis(expansion( mult = 0.005 , add = 0 )) +
203203 bayesplot_theme_get() +
204204 yaxis_title(FALSE ) +
205205 yaxis_text(FALSE ) +
@@ -262,7 +262,7 @@ mcmc_neff <- function(ratio, ..., size = NULL) {
262262 # as.character truncates trailing zeroes, while ggplot default does not
263263 labels = as.character(breaks ),
264264 limits = c(0 , max(1 , max_ratio ) + 0.05 ),
265- expand = c (0 , 0 )) +
265+ expand = expansion (0 , 0 )) +
266266 bayesplot_theme_get() +
267267 yaxis_text(FALSE ) +
268268 yaxis_title(FALSE ) +
@@ -290,7 +290,7 @@ mcmc_neff_hist <- function(ratio, ..., binwidth = NULL, bins = NULL, breaks = NU
290290 scale_color_diagnostic(" neff_ratio" ) +
291291 scale_fill_diagnostic(" neff_ratio" ) +
292292 labs(x = expression(N [eff ]/ N ), y = NULL ) +
293- dont_expand_y_axis(c( 0.005 , 0 )) +
293+ dont_expand_y_axis(expansion( mult = 0.005 , add = 0 )) +
294294 yaxis_title(FALSE ) +
295295 yaxis_text(FALSE ) +
296296 yaxis_ticks(FALSE ) +
@@ -572,7 +572,7 @@ drop_NAs_and_warn <- function(x) {
572572 scale_x_continuous(
573573 limits = c(- 0.5 , lags + 0.5 ),
574574 breaks = function (x ) as.integer(pretty(x , n = 3 )),
575- expand = c (0 , 0 )
575+ expand = expansion (0 , 0 )
576576 ) +
577577 labs(x = " Lag" , y = " Autocorrelation" ) +
578578 force_axes_in_facets()
0 commit comments