Skip to content
Prev 394805 / 398502 Next

geom_smooth

G'day Thomas,

On Sat, 12 Aug 2023 04:17:42 +0000 (UTC)
Thomas Subia via R-help <r-help at r-project.org> wrote:

            
The call "library(tidyverse)" was missing. :)
This works for me:

ggplot(scatter_data,aes(x=x_var,y=y_var,))+
  geom_point()+
  geom_smooth(se=TRUE,fill="blue",color="black",linetype="dashed") +
  geom_ribbon(stat="smooth", aes(ymin=after_stat(ymin), ymax=after_stat(ymax)), fill=NA, color="black")+
  theme_cowplot()

Cheers,
	
	Berwin