title: geom_smooth coloring for two values per row
body: <p>I have a data set that has two values per row I'd like to plot against each other.</p>
  
  <p>For example:</p>
  
  <pre><code>RHC,1,0.370,0.287,0.003,0.063
  SA,1,0.352,0.258,0.003,0.057
  GA,1,0.121,0.091,0.430,0.008
  </code></pre>
  
  <p>I want to plot an individual line per column, grouped by the first column. E.g. for the RHC row, I'm plotting {x,y1} and {x,y2} of {1,0.370} and {1,0.287} respectively.</p>
  
  <p>The following ggplot/geom_smooth accomplishes this:</p>
  
  <pre><code>ggplot(data=d) + 
    geom_smooth(aes(x=iterations, y=training.error, col=algorithm)) + 
    geom_smooth(aes(x=iterations, y=testing.error, col=algorithm))
  </code></pre>
  
  <p>However, both lines end up with a single legend entry and a single color...making them impossible to differentiate. </p>
  
  <p>How can I apply a different color and respective legend entry for each line produced by each <code>geom_smooth</code> call?</p>
  
  <p>To reproduce:</p>
  
  <pre><code>library(ggplot2)
  d &lt;- read.csv("https://gist.githubusercontent.com/jameskyle/8d233dcbd0ad0b66bfdd/raw/9c975ac9d9bbcb633e44cfd70b66f7ab89dc1517/results.csv")
  
  p1 &lt;- ggplot(data=d) +
      geom_smooth(aes(x=iterations, y=training.error, col=algorithm)) +
      geom_smooth(aes(x=iterations, y=testing.error, col=algorithm))
  
  pdf("graph.pdf")
  print(p1)
  dev.off()
  </code></pre>
  
  <p>The above code will produce:</p>
  
  <p><a href="https://i.stack.imgur.com/LgqhF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LgqhF.png" alt="ggplot graph"></a></p>