title: Combining two ecdf plots with different
body: <p>At the moment I`m writing my bachelor thesis and all of my plots are created with ggplot2. Now I need a plot of two ecdfs but my problem is that the two dataframes have different lengths. But by adding values to equalize the length I would change the distribution, therefore my first thought isn't possible. But a ecdf plot with two different dataframes with a different length is forbidden.</p>
  
  <pre><code>daten &lt;- peptidPSMotherExplained[peptidPSMotherExplained$V3!=-1,]
  daten &lt;- cbind ( daten , "scoreDistance"= daten$V2-daten$V3 )    
  daten2 &lt;- peptidPSMotherExplained2[peptidPSMotherExplained2$V3!=-1,]
  daten2 &lt;- cbind ( daten2 , "scoreDistance"= daten2$V2-daten2$V3 )
  p &lt;- ggplot(daten, aes(x = scoreDistance)) + stat_ecdf()
  p &lt;- p + geom_point(aes(x = daten2$lengthDistance))
  p
  </code></pre>
  
  <p>with the normal plot function of R it is possible</p>
  
  <pre><code>plot(ecdf(daten$scoreDistance))
  plot(ecdf(daten2$scoreDistance),add=TRUE)
  </code></pre>
  
  <p>but it looks different to all of my other plots and I dislike this.</p>
  
  <p>Has anybody a solution for me?</p>
  
  <p>Thank you,
  Tobias</p>
  
  <hr>
  
  <p>Example:</p>
  
  <pre><code>df &lt;-data.frame(scoreDifference = rnorm(10,0,12))
  df2 &lt;- data.frame(scoreDifference = rnorm(5,-3,9)) 
  plot(ecdf(df$scoreDifference))
  plot(ecdf(df2$scoreDifference),add=TRUE)
  </code></pre>
  
  <p>So how can I achieve this kind of plot in ggplot?</p>