Closed
Description
require(ggplot2)
# using default summary function no fill in the legend
ggplot(mtcars, aes(cyl ,mpg,col=factor(am),fill=factor(am)) )+
geom_point()+
stat_summary(aes(cyl,mpg), geom = "smooth")
# using median_hilow summary function no fill in the legend
ggplot(mtcars, aes(cyl ,mpg,col=factor(am),fill=factor(am)) )+
geom_point()+
stat_summary(aes(cyl,mpg),fun.data = "median_hilow", geom = "smooth")
# geom smooth shows the fill in the legend which is the expected behavior
ggplot(mtcars, aes(cyl,mpg,col=factor(am),fill=factor(am)) )+
geom_point()+
geom_smooth()