-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mcmc_pairs() + plot_bg() yields a NULL #128
Comments
I think this is because To get around this problem you can try updating the theme before making the plot, e.g: library(bayesplot)
library(ggplot2)
# set theme to default bayesplot theme but modify background
my_background <- element_rect(fill = "grey85", color = "transparent")
theme_set(theme_default() + theme(plot.background = my_background))
# then call mcmc_pairs after updating the theme
mcmc_pairs(...) Does that make the plot you were wanting? |
Actually you can just do theme_set(theme_default() + plot_bg(fill = "grey85", color = "transparent")) |
That’s instructive. Yes, both methods work great. Thanks jgabry! |
No problem, glad that worked! |
I have a handful of posterior parameters I’d like to put in a pairs plot. By itself,
mcmc_pairs()
works great. E.g.,I’d like to change my background fill. But when I try to use
plot_bg()
, I get a NULL.Yet,
plot_bg()
works just fine withmcmc_scatter().
E.g.,What am I missing?
The text was updated successfully, but these errors were encountered: