diff --git a/NEWS.md b/NEWS.md index bf6aaef8..a69d7e86 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,6 +11,7 @@ * New functions `mcmc_dots` and `mcmc_dots_by_chain` for dot plots of MCMC draws by @behramulukir (#402) * Default to `quantiles=100` for all dot plots by @behramulukir (#402) * Use `"neff_ratio"` consistently in diagnostic color scale helpers to avoid relying on partial matching of `"neff"`. +* Replace uses of `geom_bar(stat = "identity")` with the more idiomatic ggplot2 form `geom_col()` # bayesplot 1.15.0 diff --git a/R/bayesplot-colors.R b/R/bayesplot-colors.R index a581a176..83977470 100644 --- a/R/bayesplot-colors.R +++ b/R/bayesplot-colors.R @@ -222,9 +222,8 @@ plot_scheme <- function(scheme = NULL) { ) ggplot(color_data, aes(x = .data$name, y = .data$value, fill = .data$group)) + - geom_bar( + geom_col( width = .5, - stat = "identity", color = "white", linewidth = 0.1 ) + diff --git a/R/mcmc-diagnostics.R b/R/mcmc-diagnostics.R index 2a71b8e0..92c6fef4 100644 --- a/R/mcmc-diagnostics.R +++ b/R/mcmc-diagnostics.R @@ -541,9 +541,7 @@ drop_NAs_and_warn <- function(x) { bayesplot_theme_get() if (style == "bar") { graph <- graph + - geom_bar( - position = "identity", - stat = "identity", + geom_col( linewidth = 0.2, fill = get_color("l"), color = get_color("lh"),