# NOT RUN {
# pretend we had a bsl result
result <- new('bsl')
result@theta <- MASS::mvrnorm(10000, c(0.6, 0.2), diag(c(1, 1)))
result@M <- 10000
# plot using the R default plot function
par(mar = c(5, 4, 1, 2), oma = c(0, 1, 3, 0))
plot(result, which = 1, thin = 10, thetaTrue = c(0.6, 0.2),
options.plot = list(cex.main = 1, col = 'red', lty = 2, lwd = 2, main = NA))
mtext('Approximate Univariate Posteriors', outer = TRUE, cex = 1.5)
# plot using the ggplot2 package
plot(result, which = 2, thin = 10, thetaTrue = c(0.6, 0.2),
options.density = list(colour = 'darkblue', fill = 'grey80', size = 1),
options.theme = list(plot.margin = grid::unit(rep(0.05,4), 'npc'),
axis.text = ggplot2::element_text(size = 10)))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab