1313# ' @param ... Currently ignored.
1414# ' @param size,alpha For `mcmc_scatter()`, passed to
1515# ' [ggplot2::geom_point()] to control the appearance of the points.
16- # ' @param binwidth For `mcmc_hex()`, an optional numeric vector of
16+ # ' @param bins, binwidth For `mcmc_hex()`, an optional numeric vector of
1717# ' *length two* passed to [ggplot2::geom_hex()] to override the
1818# ' default binwidth in both the vertical and horizontal directions.
1919# '
@@ -156,6 +156,7 @@ mcmc_hex <- function(x,
156156 regex_pars = character (),
157157 transformations = list (),
158158 ... ,
159+ bins = 30 ,
159160 binwidth = NULL ) {
160161 suggested_package(" scales" )
161162 suggested_package(" hexbin" )
@@ -166,6 +167,7 @@ mcmc_hex <- function(x,
166167 regex_pars = regex_pars ,
167168 transformations = transformations ,
168169 hex = TRUE ,
170+ bins = bins ,
169171 binwidth = binwidth ,
170172 size = NULL ,
171173 alpha = NULL
@@ -641,6 +643,7 @@ pairs_condition <- function(chains = NULL, draws = NULL, nuts = NULL) {
641643 hex = FALSE ,
642644 size = 2.5 ,
643645 alpha = 0.8 ,
646+ bins = 30 ,
644647 binwidth = NULL ,
645648 np = NULL ,
646649 np_style = scatter_style_np()) {
@@ -702,6 +705,7 @@ pairs_condition <- function(chains = NULL, draws = NULL, nuts = NULL) {
702705 graph <- graph +
703706 geom_hex(
704707 aes(fill = scales :: rescale(after_stat(density ))),
708+ bins = bins ,
705709 binwidth = binwidth
706710 ) +
707711 scale_fill_gradientn(
0 commit comments