title: Draw a trend line using ggplot
body: <p>I used ggplot2 to draw a trend line based on my data. </p>
  
  <p>Below is something I've done using spreadsheet. </p>
  
  <p>But I only want to show the trend line (black line as shown in upper plot) rather than all dots as number of observation is > 20,000.</p>
  
  <p>So I tried to do the same thing using ggplot2. </p>
  
  <pre><code>fig_a &lt;- ggplot(df1, aes(data_x, data_y ))
  fig_a + stat_smooth(method=lm)
  fig_a + stat_smooth(method=gam)
  </code></pre>
  
  <p>Apparently it does not work well, anyone can help? </p>
  
  <p>Why it gives so many lines rather than single trend line? </p>