diff options
author | mikemeredith <mike@mmeredith.net> | 2021-06-16 14:54:33 +0800 |
---|---|---|
committer | mikemeredith <mike@mmeredith.net> | 2021-06-16 14:54:33 +0800 |
commit | ba3388e3f4358f593814c93e26395a73434d77df (patch) | |
tree | 867cf15b79d679155368c2cbbfbd5badc87ef6f5 | |
parent | 8a853b89a483ce4fac72606c209e769a0cbbba35 (diff) |
Fixed bug with single plots in traceplot and densityplot
-rw-r--r-- | DESCRIPTION | 2 | ||||
-rw-r--r-- | R/get_plot_info.R | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/DESCRIPTION b/DESCRIPTION index ac508e6..f18c435 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: jagsUI -Version: 1.5.1.9103 +Version: 1.5.1.9104 Date: 2021-06-16 Title: A Wrapper Around 'rjags' to Streamline 'JAGS' Analyses Author: Ken Kellner <contact@kenkellner.com> diff --git a/R/get_plot_info.R b/R/get_plot_info.R index e3220ff..e82202f 100644 --- a/R/get_plot_info.R +++ b/R/get_plot_info.R @@ -40,10 +40,13 @@ get_plot_info <- function(x, parameters, layout, ask, Rhat_min=NULL){ per_plot <- prod(layout) #Set up new par settings - new_par <- list(mar=c(1.5,1.5,2.5,1), oma=c(3,3,0,0), ask=ask) - if(per_plot > 1) + new_par <- list(ask=ask) + if(per_plot > 1) { new_par$mfrow <- layout - + new_par$oma <- c(3,3,0,0) + new_par$mar <- c(1.5,1.5,2.5,1) + } + list(params=parameters, new_par=new_par, per_plot=per_plot) } |