title: How to add a smooth line using ggplot2 in a plot with 2 different datasets
body: <p>I am trying to make a scatter plot with 2 different datasets and a smooth line of each scatter to compare them.</p>
  <p>I can do it separately but for some reason, I can not do it when both are in the same plot (I know it might be my lack of coding knowledge)</p>
  <p>I am trying this maybe someone can point my mistake</p>
  <pre><code>df1 &lt;- data.frame(&quot;x1&quot;=1:25, &quot;y1&quot;=rnorm(25))
  df2 &lt;- data.frame(&quot;x2&quot;=1:25, &quot;y2&quot;=rnorm(25))
  ggplot()+geom_point(data=df1,aes(x=x1,y=y1),size=2,shape=23,color=&quot;blue&quot;)+
    geom_point(data=df2,aes(x=x2,y=y2),size=2,shape=23,color=&quot;red&quot;)+geom_smooth(se=F)
  
  </code></pre>
  <p>Thanks for all the help</p>
  <p>Edit: I added workable data as suggested</p>