Hi there! I am attempting to remove one regression line that is not significant but leave the one that is, I have 2 groups of data that I used as fill (2 seasons, spring and summer) and I want to leave the regression line for spring but not for summer (see plot below). This is my code:
y.lab <- expression(bold("RAMP Score"))
x.lab <- expression(bold("Cortisol (ng/mL)"))
RAMPcortisol <- ggplot(data = cortisoldiffdata, mapping = aes(x = cortisoldiff, y = correctramp, fill = season, colour = season)) +
geom_point(size = 1.75, alpha = 3/4) +
geom_smooth(method='lm', formula = y~x, se=FALSE) +
labs(x = x.lab, y = y.lab, fill = "Season", colour = "Season") +
theme_classic() +
theme(axis.text = element_text(size = 11),
axis.title = element_text(size = 12)) +
scale_fill_manual(values = c("#08519c", "#0F7216"), labels = c("Spring", "Summer")) +
scale_colour_manual(values = c("#08306b", "#034E08"), labels = c("Spring", "Summer")) +
ylim(0,5)
RAMPcortisol
and this is the plot that it gives me:
I wasn't able to find anything just by searching. Any help would be greatly appreciated!