title: How does d3.scale.quantile work?
body: <p>What is the meaning of this statement?</p>
  
  <pre><code>quantize = d3.scale.quantile().domain([0, 15]).range(d3.range(9));
  </code></pre>
  
  <p>I saw that the domain is:</p>
  
  <blockquote>
    <p>0 - 0<br>
    1 - 15</p>
  </blockquote>
  
  <p>range is from 0 to 8 and quantize.quantiles</p>
  
  <pre><code>0 - 1.6
  1 - 3.3
  2 - 4.9
  3 - 6.6
  4 - 8.3
  5 - 9.9
  6 -11.6
  7 -13.3
  </code></pre>
  
  <p>How are the values to quantize.quantiles calculated ? I tried to call <code>quantize(2)</code> but the result was <code>1</code>. How does <code>quantile</code> work?</p>