bayesplot
bayesplot copied to clipboard
allow to change the legend text in ppc_intervals() and related functions
These are currently hardcoded as y
and yrep
, but it may be helpful to provide an easy way to override the defaults.
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"))
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.
@mcol Thanks, yeah I agree this would be nice. @tjmahr Yeah, fully agree. A function for this would be great.
Looks like a duplicate issue to #75.