title: R ggplot2 fit smoothed line to all data while having groups
body: <p>The following code makes each group have a different colored point on a scatterplot.</p>
  <pre><code>df = mtcars
  
  df$cyl = factor(df$cyl)
  
  ggplot(df, aes(x = mpg, y = disp, colour = cyl, group = cyl)) + 
    geom_point(size = 5) + 
    geom_smooth()
  </code></pre>
  <p>However, when I add a smooth line - a smoothed line is created for each group.  How do I add a smoothed line for all the data, while retaining the different group colors?</p>
  <p><a href="https://i.stack.imgur.com/8rA36.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8rA36.png" alt="Data coloured by group" /></a></p>