X-Git-Url: https://git.auder.net/?p=morpheus.git;a=blobdiff_plain;f=pkg%2FR%2Fplot.R;h=35e89ff40d096a91f368ef1c3d7438fff94e0aaf;hp=8acd2c0bd1f122f532f3d12a307b6b5538332a37;hb=476a79d4b332d378716e320fdfd95fa3e1d7be9f;hpb=0527116e18cd2ab53091de5c82d0d1d7356af4dc diff --git a/pkg/R/plot.R b/pkg/R/plot.R index 8acd2c0..35e89ff 100644 --- a/pkg/R/plot.R +++ b/pkg/R/plot.R @@ -69,7 +69,7 @@ plotBox <- function(mr, x, y) #' @examples #' #See example in ?plotHist #' @export -plotCoefs <- function(mr, params, idx) +plotCoefs <- function(mr, params, idx, xtitle="Parameter") { L <- nrow(mr[[1]][[1]]) K <- ncol(mr[[1]][[1]]) @@ -94,7 +94,7 @@ plotCoefs <- function(mr, params, idx) avg_param <- as.double(params_hat) std_param <- as.double(stdev) matplot(cbind(params[o],avg_param[o],avg_param[o]+std_param[o],avg_param[o]-std_param[o]), - col=1, lty=c(1,5,3,3), type="l", lwd=2, xlab="Parameter", ylab="Value") + col=1, lty=c(1,5,3,3), type="l", lwd=2, xlab=xtitle, ylab="") #print(o) #not returning o to avoid weird Jupyter issue... (TODO:) }