wwiecek / baggr

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

Reversal of colours in the legend in `ggplot` #151

Closed wwiecek closed 11 months ago

wwiecek commented 1 year ago

In ggplot (as always) the order of groups does not follow ordering of the legend, but is instead reversed, e.g.

library(magrittr)
bg1 <- baggr(schools)
bg2 <- baggr(schools)
baggr_compare(bg1, bg2) %>% plot()

The vertical ordering of colours should meet ordering of labels in the legend (simply reverse ordering of factor)