Skip to content
Prev 319079 / 398506 Next

ggplot2: modifying line width and background fill color for stat_smooth()

Is this roughly what you want? Shamelessly stolen , I mean , adapted from http://docs.ggplot2.org/0.9.3/stat_smooth.html

 donner<-read.csv("http://www.ling.upenn.edu/~joseff/data/donner.csv")
  
  ggplot(donner, aes(AGE, NFATE, colour = GENDER))+
    geom_point(position = position_jitter(height = 0.02, width = 0)) +
    stat_smooth(method = "glm", family = binomial, formula = y ~ poly(x,2),
                alpha = 0.1, size=2, aes(fill = GENDER))
  

John Kane
Kingston ON Canada
____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!