Overlaying two plots using ggplot2 in R
<p>There are two data frames - <code>df1</code> &amp; <code>df2</code> from which I need to create line plot using ggplot2 and display on the same graph.</p>
<h1><code>df1</code></h1>
<pre><code> x   y 
2   30
4   25
6   20
8   15
</code></pre>
<h1><code>df2</code></h1>
<pre><code> x   y 
2   12
4   16
6   20
8   24
</code></pre>
<p>for plotting the first df,</p>
<pre><code>p1 &lt;- ggplot( df1, aes(x = df1[,1] , y = log(df1[,2]) ) )
p1 &lt;- p1 + geom_line(aes(y = log(df1[,2])))
p1
</code></pre>
<p>how do we get a same plot overlay on same graph for data frame <code>df2</code></p>