title: Matplotlib cumulative histogram - vertical line placement bug or misinterpretation?
body: <p>I am not sure if this is a bug or if I am simply misinterpreting the output of matplotlib's cumulative histogram. E.g., what I expect is &quot;at a certain x value, the corresponding y-value tells me how many samples are &lt;= x.&quot;</p>
  <pre><code>import matplotlib.pyplot as plt
  
  X = [1.1, 3.1, 2.1, 3.9]
  n, bins, patches = plt.hist(X, normed=False, histtype='step', cumulative=True)
  plt.ylim([0, 5])
  plt.grid()
  plt.show()
  </code></pre>
  <p><img src="https://i.stack.imgur.com/Zahr7.png" alt="enter image description here" /></p>
  <p>See the 2nd vertical line at <code>x=1.9</code>? Shouldn't it be at 2.1 given the data in <code>X</code>? E.g., at x=3 I would read &quot;3 samples have a value x &lt;= 3.1&quot; ...</p>
  <p>So, basically what I would expect is something similar to this step plot.</p>
  <pre><code>plt.step(sorted(X), range(1, len(X)+1), where='post')
  plt.ylim([0, 5])
  plt.grid()
  </code></pre>
  <p><img src="https://i.stack.imgur.com/Ulihf.png" alt="enter image description here" /></p>
  <h3>Edit:</h3>
  <p>I am using python 3.4.3 &amp; matplotlib 1.4.3</p>