rplotggpairs

Remove the loess smooth standard error gray area (or apply alpha to it)


The following code returns the plot below. Is there a way to remove the standard error gray area or apply alpha to it so it's not so saturated? Especially the case where many lines are plotted this can interfere in the visualization. Thanks!

library(GGally)
library(ggplot2)
ggpairs(swiss[1:3], 
        lower=list(continuous=wrap("smooth", colour="blue")),
        diag=list(continuous=wrap("barDiag", fill="blue")))

enter image description here


Solution

  • You can put se = F , like in ggplot2::geom_smooth():

    library(GGally)
    library(ggplot2)
    ggpairs(swiss[1:3], 
            lower=list(continuous=wrap("smooth", colour="blue", se = F)),
            diag=list(continuous=wrap("barDiag", fill="blue")))
    

    enter image description here