title: How to scatter plot using face_wrap of ggplot in R?
body: <p>I need to <code>scatter plot</code> Observed Vs Predicted data of each <code>Variable</code> using <code>facet_wrap</code> functionality of <code>ggplot</code>. I might be close but not there yet. I use some suggestion from an answer to my previous question to <code>gather</code> the data to automate the <code>plotting</code> process. Here is my code so far- I understand that the <code>aes</code> of my <code>ggplot</code> is wrong but I used it purposely to make my point clear. I would also like to add <code>geom_smooth</code> to have the <code>confidence interval</code>.</p>
  
  <pre><code>library(tidyverse)
  DF1 = data.frame(A = runif(12, 1,10), B = runif(12,5,10), C = runif(12, 3,9), D = runif(12, 1,12))
  DF2 = data.frame(A = runif(12, 4,13), B = runif(12,6,14), C = runif(12, 3,12), D = runif(12, 4,8))
  
  DF1$df &lt;- "Observed"
  DF2$df &lt;- "Predicted"
  
  DF = rbind(DF1,DF2)
  DF_long = gather(DF, key = "Variable", value = "Value", -df)
  
  ggplot(DF_long, aes(x = Observed, y = Predicted))+
    geom_point() +   facet_wrap(Variable~.)+ geom_smooth()
  </code></pre>
  
  <p>I should see a <code>plot</code> like below, comparing <code>Observed Vs Predicted</code> for each <code>Variable</code>.
  <a href="https://i.stack.imgur.com/YiGSP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YiGSP.png" alt="enter image description here"></a></p>