I am using ggplot2 to generate the plot below. For some reason, it introduces titles to subplots that I want to be removed. When I remove geom_hline() lines, it somehow removes them. However, I need those horizontal lines to denote boundaries. And the subplots are generated from scale_y_cut(). Looks like there is a crosstalk between the two, that I don't understand. Your help is appreciated!
The code
library(ggsignif)
library(tidyverse)
library(ggpubr)
library(readxl)
library(rstatix)
library(stringr)
library(ggbreak)
CO2 <- CO2
ggplot(CO2, aes_string(x="Plant",y="uptake", fill="Plant"))+
geom_boxplot(outlier.alpha = 0.25, outlier.color = "red") +
geom_point(alpha = 0.25, size = 2 )+
facet_wrap(~Type)+
stat_compare_means(comparisons = list(c("Qn1","Qn2")), label.y = 105 )+
stat_compare_means(comparisons = list(c("Qc1","Qc2")), label.y = 110)+
stat_compare_means(comparisons = list(c("Mn1","Mn2")), label.y = 115)+
theme(axis.text.x = element_text(angle = 20))+
geom_hline(yintercept=100, linetype="dashed", color="red", size=1)+
geom_hline(yintercept=5, linetype="dashed", color="red", size=1)+
geom_hline(yintercept=130)+
geom_hline(yintercept=0)+
labs(y="uptake")+
scale_y_cut(breaks=c(7, 50, 95), which=c(1,2,3,4), scales=c(1,0.25,3,0.25))
It will also be nice to remove those crowded tick marks (between 0-6 & 50-100) from the plot if possible. Thank you for your help!