Graphical parameters for geom_smooth() band#6651
Graphical parameters for geom_smooth() band#6651teunbrand wants to merge 12 commits intotidyverse:mainfrom
geom_smooth() band#6651Conversation
thomasp85
left a comment
There was a problem hiding this comment.
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