title: Creating a scatterplot with one x and multiple y values
body: <p>I have data of the form:</p>
  
  <pre><code>[x]  [y1] [y2]
  1    0.9   1
  2    2.0   2
  3    3.1   3
  </code></pre>
  
  <p>Where (x,y1) are actual values and y2 is a prediction for y1 based on a linear model estimated on another set of data. (x, y1, y2) are in a dataframe DT. How can I make a scatterplot using xyplot that graphs x on the x-axis and y1 and y2 on the y-axis but with different colors? </p>
  
  <p>I was able to do this in ggplot using the following code, but think it looks much less nice than using the xyplot() command, and am wondering if I can use xyplot / lattice in this case.</p>
  
  <pre><code>ggplot(DT, aes(x)) + geom_point(aes(y=y1), color="red") + geom_point(aes(y=y2), color = "green")
  </code></pre>
  
  <p>Thank you very much in advance!</p>