title: What are quantiles in ggplot stat_quantile?
body: <p>Here is my reproducible data:</p>
  
  <pre><code>library("ggplot2")
  library("ggplot2movies")
  library("quantreg")    
  set.seed(2154)
  msamp &lt;- movies[sample(nrow(movies), 1000), ]
  </code></pre>
  
  <p>I am trying to become acquainted with <a href="http://docs.ggplot2.org/current/stat_quantile.html" rel="nofollow">stat_quantile</a> but the example from the documentation raises a couple of questions. </p>
  
  <pre><code>mggp &lt;- ggplot(data=msamp, mapping=aes(x=year, y=rating)) + 
      geom_point() + 
      stat_quantile(formula=y~x, quantiles=c(0, 0.25, 0.50, 0.75, 1)) + 
      theme_classic(base_size = 12) + 
      ylim(c(0,10))
  mggp
  </code></pre>
  
  <ol>
  <li><p>To my understanding quantiles split the data into parts that are smaller than the defined cut-off values, correct? If I define quantiles like in the following code I get five lines. Why? What do they represent?</p></li>
  <li><p>It seems that the quantiles are calculated based on the dependent variable on the y-axis (rating). Is it possible to reverse this? I mean to split the data based on quantiles in 'year'?</p></li>
  </ol>