title: overlaying plots from different dataframes in ggplot without messing with legend
body: <p>I want to overlay two plots: one is a simple point plot where a variable is used to control the dot size; and another is a simple curve. </p>
  
  <p>Here is a dummy example for the first plot;</p>
  
  <pre><code>library(ggplot2)
  x &lt;- seq(from = 1, to = 10, by = 1)
  df = data.frame(x=x, y=x^2, v=2*x)
  ggplot(df, aes(x, y, size = v)) + geom_point() + theme_classic() + scale_size("blabla")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/GdQTb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GdQTb.png" alt="enter image description here"></a></p>
  
  <p>Now lets overlay a curve to this plot with data from another dataframe:</p>
  
  <pre><code>df2 = data.frame(x=x, y=x^2-x+2)
  ggplot(df, aes(x, y, size = v)) + geom_point() + theme_classic() + scale_size("blabla") + geom_line(data=df2, aes(x, y), color = "blue") + scale_color_discrete(name = "other", labels = c("nanana"))
  </code></pre>
  
  <p>It produces the error: </p>
  
  <blockquote>
    <p>Error in FUN(X[[i]], ...) : object 'v' not found</p>
  </blockquote>
  
  <p>The value in v is not used to draw the intended curse, but anyway, I added a dummy v to df2.</p>
  
  <pre><code>df2 = data.frame(x=x, y=x^2-x+2, v=replicate(length(x),0))  # add a dummy v
  ggplot(df, aes(x, y, size = v)) + geom_point() + theme_classic() + scale_size("blabla") + geom_line(data=df2, aes(x, y), color = "blue") + scale_color_discrete(name = "other", labels = c("nanana"))
  </code></pre>
  
  <p>An the result has a messed legend:</p>
  
  <p><a href="https://i.stack.imgur.com/2imTq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2imTq.png" alt="enter image description here"></a></p>
  
  <p>What is the right way to achieve the desired plot?</p>