I would like to restrict the end of the y-axis without restricting the range of the shown data in this plot on the y-axis
from 0
to 32
. Specifically, the axis should not be shown for higher values but the significance comparison should be included and the part in red should not be shown.
library(ggpubr)
data("ToothGrowth")
head(ToothGrowth)
# Visualize: Specify the comparisons you want
my_comparisons <- list( c("0.5", "1"), c("1", "2"), c("0.5", "2") )
ggboxplot(ToothGrowth, x = "dose", y = "len",
color = "dose", palette = "jco")+
stat_compare_means(comparisons = my_comparisons)+ # Add pairwise comparisons p-value
stat_compare_means(label.y = 50) # Add global p-value