wwiecek / baggr

R package for Bayesian meta-analysis models, using Stan
GNU General Public License v3.0
46 stars 12 forks source link

Resolve issue 25 #176

Closed dannytoomey closed 8 months ago

dannytoomey commented 1 year ago

Hi Witold,

Here's a PR that resolves issue #25, or at least partly. This currently allows any colors in the plot to be changed with descriptive (red) or hex (#FF0000) values matched by the items in the plot.

For example, to change a hypermean red and School A blue for model bg, the command would be plot(bg,hyper=TRUE,add_color_to=list('Hypermean','red','School A,'blue'). I added a second commit that allows add_color_to=c('Hypermean','red','School A,'blue') to be passed as well.

This currently does not support plots graphed as areas. The ggplot data for area plots is a bit more complicated. I figured I would send this and make sure this at least was what you had in mind, since I already took some liberties! If this looks good, I can apply this to area plots as well.

Best regards,

Danny Toomey

wwiecek commented 8 months ago

I rewrote this and then added a separate commit to devel today