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

allow to change the legend text in ppc_intervals() and related functions #157

Open
mcol opened this issue Jun 4, 2018 · 3 comments
Open
Labels

Comments

@mcol
Copy link
Contributor

mcol commented Jun 4, 2018

These are currently hardcoded as y and yrep, but it may be helpful to provide an easy way to override the defaults.

@tjmahr
Copy link
Collaborator

tjmahr commented Jun 6, 2018

Hmm, we could export our colorizers.

library(bayesplot)
library(ggplot2)

y <- rnorm(50)
yrep <- matrix(rnorm(5000, 0, 2), ncol = 50)

color_scheme_set("darkgray")

ppc_intervals(y, yrep) + 
  bayesplot:::scale_color_ppc_dist(labels = c("no", "yes")) + 
  bayesplot:::scale_fill_ppc_dist(labels = c("no", "yes"))

image

Or do some kind of scale_color_bayesplot() which wraps scale_color_manual() so that it gets the current bayesplot color-scheme. I think that using a function to customize a plot is better than creating more options for functions to handle.

@jgabry
Copy link
Member

jgabry commented Jun 10, 2018

@mcol Thanks, yeah I agree this would be nice. @tjmahr Yeah, fully agree. A function for this would be great.

@jgabry jgabry added the feature label Jun 10, 2018
@silberzwiebel
Copy link
Contributor

Looks like a duplicate issue to #75.

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

4 participants