ggplot に傾向線を追加したいのですが、重要な関係に対してのみです。geom_smooth
各グループに傾向線を追加しますstat_smooth
が、どのグループが傾向線を取得し、どのグループが取得しないかを指定したいと思います。
私のスクリプトの例の下:
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)