I want to add trendlines to my ggplot, but only for the significant relations.
Now geom_smooth
or stat_smooth
adds trendlines for each group, but I want to specify which groups get a trendline and which don't.
Below an example of my script:
plot20<-ggplot(data, aes(x=data$Density, y=data$Total.degrees, color=Species, shape=Species))
+ geom_point(size=3)
+ scale_shape_manual(values=shapeset)
+ scale_colour_manual(values=colorset)
+ theme(legend.position="none")
+ geom_smooth(method=lm, se=FALSE)