s6juncheng / ggpval

Add statistical test or annotation to your ggplot2 plots,
https://s6juncheng.github.io/ggpval/
45 stars 9 forks source link

add_pval() Ignores factor order #21

Open riedlc opened 6 months ago

riedlc commented 6 months ago

To re-order data in plots (e.g., categorical variables on x-axis, or facet_wrap()), {ggplot} encourages to turn variables into factors and specify the desired order there. However, add_pval() seems to ignore factors and revers to simple (alphabetical) sorting of categorical levels.