I am creating a scatterplot (around 1,500,000 points), and I running regressions through it based on a factor variable (see below "halfs"). This is the picture:

![enter image description here](https://i.stack.imgur.com/3tSvs.png) 

As you can see it is difficult to see the "red" regression lines.

This is the data:

```
  For_Cov     Per_chg      halfs
  1  0.8372001 0.002400000 upper half
  2  0.7236001 0.002800111 upper half
  3  0.6036000 0.000800000 upper half
  4  0.8540000 0.000000000 upper half
  5  0.9080001 0.003200000 upper half
  6  0.8248000 0.000000000 upper half
  7  0.1132000 0.000000000 upper half
  8  0.2044000 0.007600000 upper half
  9  0.2476001 0.085200000 upper half
  10 0.2368000 0.003600000 upper half

```

This is the code:

```
 ggplot(grid_gdp_full, aes(x = For_Cov, y = Def_Chg, group = factor(halfs))) + 
    geom_point(aes(colour = halfs), alpha = 0.1) +
    stat_smooth(method = "lm", formula = y ~ x + I(x^2), size = 4, fullrange=TRUE,     aes(group = halfs, colour = halfs), alpha = 1) +
    xlab("Initial") +
    ylab("Percent") +
    ylim(0,0.10) +
    scale_x_reverse() +
    theme_bw() +theme(
    axis.text=element_text(size=12)
    ,axis.title=element_text(size=14,face="bold")
    ,plot.background = element_blank()
    ,panel.grid.major = element_blank()
    ,panel.grid.minor = element_blank()
    ,panel.border = element_blank()
    ,panel.background = element_blank()
     ) +
     theme(axis.line = element_line(color = 'black')) 

```

Does anyone how to change the code so that the regression lines will have different colors (regression line is created by stat\_smooth) - possibly grey and blue for the two factor levels without changing the initial color of the points?

Here is the code I am using at the moment and I am still not able to get the two different colored lines:

```
 ggplot(grid_gdp_full, aes(x = For_Cov, y = Def_Chg, fill = factor(halfs))) + 
   geom_point(aes(colour = halfs), alpha = 0.1, colour="transparent",shape=21) +
   stat_smooth(method = "lm", formula = y ~ x + I(x^2), size = 2, fullrange=TRUE, aes(group = factor(halfs)), alpha = 1) +
   xlab("Initial") +
   ylab("Percent") +
   ylim(0,0.1) +
   scale_x_reverse() +
   theme_bw() +theme(
     axis.text=element_text(size=12)
     ,axis.title=element_text(size=14,face="bold")
     ,plot.background = element_blank()
     ,panel.grid.major = element_blank()
     ,panel.grid.minor = element_blank()
     ,panel.border = element_blank()
     ,panel.background = element_blank()
   ) +
   theme(axis.line = element_line(color = 'black')) +
   scale_colour_manual(values = c("red","blue")) + 
   scale_fill_manual(values = c("grey","green"))

dev.off()

```