mcguinlu / robvis

A package to quickly visualise risk-of-bias assessment results
https://mcguinlu.github.io/robvis/
Other
58 stars 22 forks source link

rob_summary() legend truncated to max risk of bias level in data #125

Open paulsharpeY opened 3 years ago

paulsharpeY commented 3 years ago

Describe the bug

rob_summary() legend only shows the categories as far as the highest level in the data. A reviewer found this confusing as it doesn't show the full RoB range.

To Reproduce

Run rob_summary() on data with highest RoB = Some concerns.

Expected behavior

Legend includes full range of RoB categories, irrespective of those present in the data.

Screenshots

rob_summary

mcguinlu commented 3 years ago

Thanks @paulsharpeY - I've added this as a prereq for the upcoming v1.0.0.


NTS: should be easy to do this by passing drop = FALSE to scale_fill*(). Might also be worth looking at this for the traffic light plot?