ggplot2 geom_smooth se

Hey people,

I'm new to the community
I have been learning to work with R-studio for 2/3 months

I have a question about the se condition in the geom_smooth function.
Is it possible to have the se but less visible in de graph.
I Have 3 lines close together and they are not really visible anymore under the se.

I would really like to show the se, and i donnot want the change the standard error level

You can do this by setting alpha in the geom_smooth() geom. See reprex, below:

library(ggplot2)
ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  geom_smooth()
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'


ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  geom_smooth(alpha = 0.3)
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'


ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  geom_smooth(alpha = 0.1)
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Created on 2018-12-12 by the reprex package (v0.2.1.9000)

See also this answer on StackOverflow for how to control the opacity of the line and the ribbon separately:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.