-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Graphical parameters for geom_smooth() band
#6651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
thomasp85
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this PR, there would be no way to synchronise the look of the outer bands with the central one, right?
|
That's right. Do you think missing parameters should be drawn from the central line? |
|
That is how we do it for the others, right? |
|
I think the meaning of |
|
oh, yeah you are right... Then just default the arguments to |
Merge branch 'main' into geom_smooth_band_gp # Conflicts: # man/geom_smooth.Rd
|
I'm now hiding it with devtools::load_all("~/packages/ggplot2/")
#> ℹ Loading ggplot2
ggplot(mpg, aes(displ, hwy)) +
geom_smooth(band.linetype = 1, linetype = 2)
#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
ggplot(mpg, aes(displ, hwy)) +
geom_smooth(band.linetype = NULL, linetype = 2)
#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'Created on 2025-12-04 with reprex v2.1.1 |


This PR aims to fix #6551.
Briefly, we allow setting the colour/linetype/linewidth of the confidence bands in
geom_smooth().A demonstration:
Created on 2025-09-26 with reprex v2.1.1