我试图从geom_smooth中删除回归线,只保留置信区间.我曾尝试size = 0,size = NULL和size = NA,但没有工作.有没有人知道的简单解决方法?
baseball <- ddply(x, .(id), transform, bat.avg = h/ab)
hank <- subset(baseball, id == 'aaronha01')
ggplot(hank, aes(x = year, y = bat.avg)) +
geom_line(size = 1.2, color = '#336699') +
geom_smooth(fill = '#bf3030', size = NA) +
labs(x = '', y = '')
Run Code Online (Sandbox Code Playgroud)

Did*_*rts 13
你可以linetype=0在里面geom_smooth()设置删除线.
ggplot(mtcars,aes(wt,mpg))+geom_smooth(linetype=0)
Run Code Online (Sandbox Code Playgroud)
