title: Quantile-Quantile plot: compare multiple modelled variables vs one oberved variable ggplot2 R
body: <p><strong>Sample data</strong></p>
  
  <pre><code>set.seed(10)
     dat &lt;- data.frame(Observed = rnorm(20), 
                      sim1= rnorm(20), sim2 = rnorm(20),
                      sim3 = rnorm(20),sim4 = rnorm(20),
                      sim5 = rnorm(20),sim6 = rnorm(20)
                     )
  </code></pre>
  
  <p><code>stat_qq</code> and <code>geom_qq</code> seem be designed to compare one or more vectors e.g. sim1-6 vectors to a theoretical distribution. I couldn't see how to use it to compare multiple different vectors, e.g each of <code>sim1</code> to <code>sim6</code> compared against <code>Observed</code>? </p>
  
  <p>However, I have the output of a model (<code>sim1-sim6</code>) and would like to check if the modelled output compares with the the <code>Observed</code>. </p>
  
  <p>How can I accomplish this in <code>ggplot2</code>? The <code>y-axis</code> is <code>sim1-sim6</code> and <code>x-axis</code> is <code>Observed</code>.</p>
  
  <p>Remember: I am comparing each of <code>sim</code> to <code>Observed</code>.</p>
  
  <p>All suggestions are welcome.</p>
  
  <p><strong>EDIT:SOLUTION IN BASE R</strong></p>
  
  <pre><code>set.seed(10)
     dat1 &lt;- data.frame(Observed = rnorm(20), sim1= rnorm(20), sim2 = rnorm(20),sim3 = rnorm(20),sim4 = rnorm(20),sim5 = rnorm(20),sim6 = rnorm(20))
     #
     # create a QQ-plot of Sims as a function of Observed
     qqplot(dat1$Observed, dat$sim1, xlim = range(dat1), ylim = range(dat1), 
            xlab = "Observed", ylab = "Sims....")
     # create a diagonal line
     abline(a = 0, b = 1)
     # add the points of sims
     points(sort(dat1$Observed), sort(dat1$sim2), col = "red")
     points(sort(dat1$Observed), sort(dat1$sim3), col = "blue")
     points(sort(dat1$Observed), sort(dat1$sim4), col = "green")
     points(sort(dat1$Observed), sort(dat1$sim5), col = "magenta")
     points(sort(dat1$Observed), sort(dat1$sim6), col = "purple")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/8tgBI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8tgBI.png" alt="enter image description here"></a></p>
  
  <p><strong>My question:</strong></p>
  
  <p>How can one possibly accomplish the same task in <code>ggplot2</code>?</p>