You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would really like to use stat_compare_means to display the significance levels of my dataset.
The only thing I can't seem to fix is the order of the labels, ggplot keeps these factor levels nice in order, but your function does not keep this order.
It might be a variable I completely missed, but I have not found a solution in the last 3 days.
I have the levels of the dataset properly ordered, ggplot keeps the levels in order, but the labeling of your function does not keep the order, resulting in wrong significance levels, it seems to order the factors alphabettically.
Is that something I can easily fix, or is there a line in your code where the labels are reordered?
Cheers,
Rob van der Kant
The text was updated successfully, but these errors were encountered:
Hi Kassambara,
I would really like to use stat_compare_means to display the significance levels of my dataset.
The only thing I can't seem to fix is the order of the labels, ggplot keeps these factor levels nice in order, but your function does not keep this order.
It might be a variable I completely missed, but I have not found a solution in the last 3 days.
p1<- ggplot(data=subsetChain, aes(x=Chothia,y=total.energy))+
geom_boxplot(aes(fill=LCtype),outlier.shape=NA,notch=TRUE)+theme_bw()+
stat_compare_means(aes(group = LCtype), label = "p.signif",geom="label")+
scale_y_continuous(limits=c(-5,5))+ ylab("Total energy (kcal/Mol)")+
theme(axis.title.x=element_blank(),legend.position=c(0.01,0.9))
I have the levels of the dataset properly ordered, ggplot keeps the levels in order, but the labeling of your function does not keep the order, resulting in wrong significance levels, it seems to order the factors alphabettically.
Is that something I can easily fix, or is there a line in your code where the labels are reordered?
Cheers,
Rob van der Kant
The text was updated successfully, but these errors were encountered: