在下面的代码中,fullrange=TRUE 似乎被忽略了。
有什么想法有什么问题吗?
df <- data.frame("x"=c(119,118,144,127,78.8,98.4,108,50,74,30.4,
50,72,99,155,113,144,102,131,105,127,120,85,153,40.6,133),
"y"=c(1.56,2.17,0.81,1.07,1.12,2.03,0.90,1.48,0.64,
0.91,0.85,0.41,0.55,2.18,1.49,1.56,0.82,0.93,0.84,1.84,
0.78,1.15,3.85,3.30,0.94))
library(ggplot2)
library(MASS)
ggplot(df,aes(x=x,y=y))+geom_point(size=3,colour="black")+
stat_smooth(method="rlm",alpha=0.1,fullrange=TRUE,se=TRUE)+
theme_bw()+
theme(text = element_text(size=12),axis.title.y=element_text(size=12,face="bold"),
axis.title.x=element_text(size=12,face="bold"),
axis.line = element_line(colour = "darkgrey"),
panel.border = element_blank())+coord_cartesian(xlim=c(0,200),ylim=c(0,4))