Skip to content

Commit fcb73c9

Browse files
authored
Merge pull request #375 from stan-dev/mcmc_scatter-shape
add `shape` argument to `mcmc_scatter`
2 parents 89fea18 + b4866e3 commit fcb73c9

File tree

5 files changed

+4070
-3
lines changed

5 files changed

+4070
-3
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# bayesplot (development version)
22

3+
* Add `shape` argument to `mcmc_scatter()` by @behramulukir (#375)
4+
35
# bayesplot 1.14.0
46

57
* PPC "avg" functions (`ppc_scatter_avg()`, `ppc_error_scatter_avg()`, etc.) gain a `stat` argument

R/mcmc-scatterplots.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#' @template args-regex_pars
1212
#' @template args-transformations
1313
#' @param ... Currently ignored.
14-
#' @param size,alpha For `mcmc_scatter()`, passed to
14+
#' @param shape,size,alpha For `mcmc_scatter()`, passed to
1515
#' [ggplot2::geom_point()] to control the appearance of the points.
1616
#' @param bins,binwidth For `mcmc_hex()`, an optional numeric vector of
1717
#' *length two* passed to [ggplot2::geom_hex()] to override the
@@ -129,6 +129,7 @@ mcmc_scatter <- function(x,
129129
regex_pars = character(),
130130
transformations = list(),
131131
...,
132+
shape = 21,
132133
size = 2.5,
133134
alpha = 0.8,
134135
np = NULL,
@@ -139,6 +140,7 @@ mcmc_scatter <- function(x,
139140
pars = pars,
140141
regex_pars = regex_pars,
141142
transformations = transformations,
143+
shape = shape,
142144
size = size,
143145
alpha = alpha,
144146
hex = FALSE,
@@ -641,6 +643,7 @@ pairs_condition <- function(chains = NULL, draws = NULL, nuts = NULL) {
641643
regex_pars = character(),
642644
transformations = list(),
643645
hex = FALSE,
646+
shape = 21,
644647
size = 2.5,
645648
alpha = 0.8,
646649
bins = 30,
@@ -684,7 +687,7 @@ pairs_condition <- function(chains = NULL, draws = NULL, nuts = NULL) {
684687
if (!hex) { # scatterplot
685688
graph <- graph +
686689
geom_point(
687-
shape = 21,
690+
shape = shape,
688691
color = get_color("dh"),
689692
fill = get_color("d"),
690693
size = size,

man/MCMC-scatterplots.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)