How to show legend for ggsignif layer in final ggplot

I am quite new to ggplot. Here I just wanted to do a simple box plot of level of OPG (a molecule) between three groups, namely "RA", "Control" and "OA". The grouping information is contained in the column "Group". On top of that, I added a ggsignif layer where I used annotation instead of exact p-value. I set show.legend to be true but the significance legend is not showing up together with the grouping legend. I am not sure which exact command to use to display the legend for ggsignif layer. I have attached my code and plot below. Any help would be appreciated!

  geom_boxplot(aes(color=Group)) +
  geom_signif(comparisons = list(c("RA","Control"),
              step_increase = 0.1,
              show.legend = TRUE) +
  labs(y="Serum OPG Level") +

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.