每种趋势线都要同时用 颜色、线宽、线型三个要素表示。
求各位指点。
- ggplot(mtcars,aes(mpg,wt))+
- geom_point()+
- geom_smooth(method='lm',se=FALSE,show.legend=TRUE,
- linetype=1,color='black',size = 1)+
- geom_smooth(formula=y~poly(x,2),se=FALSE,show.legend=TRUE,
- linetype=2,color='blue',size=1.2)+
- geom_smooth(method='gam',se=FALSE,show.legend=TRUE,
- linetype=3,color='gold',size=1.5)+
- stat_function(fun = function(x) -0.08*x +5, linetype=4,
- show.legend=TRUE,size=2,color='red')


雷达卡





京公网安备 11010802022788号







