Control transparency of smoother and confidence interval

前端 未结 1 1442
抹茶落季
抹茶落季 2020-12-16 17:33

I\'m refering to this SO question from 2 years ago, with ggplot : Adjust Transparency (alpha) of stat_smooth lines, not just transparency of Confidence Interval

The

相关标签:
1条回答
  • 2020-12-16 18:00

    This calculates the model twice. But normally that shouldn't be a performance issue.

    ggplot(head(airquality, 60), aes(x=Day, y=Temp, color=factor(Month))) +
      geom_point() + 
      geom_ribbon(stat='smooth', method = "lm", se=TRUE, alpha=0.1, 
                  aes(color = NULL, group = factor(Month))) +
      geom_line(stat='smooth', method = "lm", alpha=0.3)
    

    resulting plot

    0 讨论(0)
提交回复
热议问题