Skip to content
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

User controlled geom_args #237

Open
grantmcdermott opened this issue Sep 8, 2020 · 3 comments
Open

User controlled geom_args #237

grantmcdermott opened this issue Sep 8, 2020 · 3 comments
Labels

Comments

@grantmcdermott
Copy link

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.

@jgabry jgabry added the feature label Sep 10, 2020
@jgabry
Copy link
Member

jgabry commented Sep 10, 2020

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.

@grantmcdermott
Copy link
Author

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.

@jgabry
Copy link
Member

jgabry commented Sep 15, 2020

Worked a charm, thanks Jonah!

Great, glad that works!

Given that a full set of user-controlled geom_args arguments 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants