bayesplot
bayesplot copied to clipboard
User controlled geom_args
Really enjoying this package. Thanks for putting it together.
Without opening a whole can of worms... would it be possible to add geom_args to the list of supported arguments that users can control?
My motivating case is fairly trivial, but I'd love to be able to turn off the automatic fill for mcmc_dens. Or, at least, set a low alpha on it.
Glad you're enjoying the package! Adding a geom_args argument is definitely something we should consider but would require deprecating all the existing arguments that are passed to the geoms to avoid multiple ways of setting them (not all functions pass many args to the geoms but some do and if we go that route we'd want to do it for all functions I think). So I'm open to that but it might be more of a long term project. @tjmahr What do you think?
As a short term solution, we can certainly add an alpha argument to mcmc_hist() and mcmc_dens(). Many other functions have that argument but I guess we never added it for those. That's a super easy change so I went ahead and made a branch that you can try out. You can install it with
devtools::install_github("stan-dev/bayesplot", ref = "mcmc-hist-dens-alpha")
Does that work for you? To turn off the fill I guess you can set alpha=0, which should look equivalent to turning it off.
Worked a charm, thanks Jonah!
Given that a full set of user-controlled geom_args arguments is a longer-term project, please feel free to close.
PS. Unrelated to this issue, but just to say thanks too for all your other Stan work. I recently switched an old JAGS-based project to CmdStanR and I could not believe the speed/efficiency improvements.
Worked a charm, thanks Jonah!
Great, glad that works!
Given that a full set of user-controlled
geom_argsarguments is a longer-term project, please feel free to close.
I think I'll leave it open because this is definitely something worth considering and I don't want to forget!
PS. Unrelated to this issue, but just to say thanks too for all your other Stan work. I recently switched an old JAGS-based project to CmdStanR and I could not believe the speed/efficiency improvements.
Awesome, it's great to hear that. I really appreciate it!