Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# bayesplot (development version)

* Add `shape` argument to `mcmc_scatter()` by @behramulukir (#375)

# bayesplot 1.14.0

* PPC "avg" functions (`ppc_scatter_avg()`, `ppc_error_scatter_avg()`, etc.) gain a `stat` argument
Expand Down
7 changes: 5 additions & 2 deletions R/mcmc-scatterplots.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @template args-regex_pars
#' @template args-transformations
#' @param ... Currently ignored.
#' @param size,alpha For `mcmc_scatter()`, passed to
#' @param shape,size,alpha For `mcmc_scatter()`, passed to
#' [ggplot2::geom_point()] to control the appearance of the points.
#' @param bins,binwidth For `mcmc_hex()`, an optional numeric vector of
#' *length two* passed to [ggplot2::geom_hex()] to override the
Expand Down Expand Up @@ -129,6 +129,7 @@ mcmc_scatter <- function(x,
regex_pars = character(),
transformations = list(),
...,
shape = 21,
size = 2.5,
alpha = 0.8,
np = NULL,
Expand All @@ -139,6 +140,7 @@ mcmc_scatter <- function(x,
pars = pars,
regex_pars = regex_pars,
transformations = transformations,
shape = shape,
size = size,
alpha = alpha,
hex = FALSE,
Expand Down Expand Up @@ -641,6 +643,7 @@ pairs_condition <- function(chains = NULL, draws = NULL, nuts = NULL) {
regex_pars = character(),
transformations = list(),
hex = FALSE,
shape = 21,
size = 2.5,
alpha = 0.8,
bins = 30,
Expand Down Expand Up @@ -684,7 +687,7 @@ pairs_condition <- function(chains = NULL, draws = NULL, nuts = NULL) {
if (!hex) { # scatterplot
graph <- graph +
geom_point(
shape = 21,
shape = shape,
color = get_color("dh"),
fill = get_color("d"),
size = size,
Expand Down
3 changes: 2 additions & 1 deletion man/MCMC-scatterplots.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading