<p dir="auto">On a histogram with a single value repeated for 100 times I get an extra tiny box.<br>
The code to reproduce the issue:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from matplotlib import pylab as plt
plt.hist([33]*100)
plt.show()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pylab</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-s1">plt</span>.<span class="pl-en">hist</span>([<span class="pl-c1">33</span>]<span class="pl-c1">*</span><span class="pl-c1">100</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto">Here you can see a black line next to 32.6.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/671660/17805532/3ed8d7e0-6600-11e6-97ea-893a87e77ef6.png"><img src="https://cloud.githubusercontent.com/assets/671660/17805532/3ed8d7e0-6600-11e6-97ea-893a87e77ef6.png" alt="figure_1" style="max-width: 100%;"></a></p>
<ul dir="auto">
<li>Matplolib: 1.5.1-1ubuntu1 (from repository), Python 2.7.12, Ubuntu 16.04.1</li>
<li>The same problem can be reproduced in python 3.5.2.</li>
</ul>
<p dir="auto">There is a visualization glitch with matplotlib <code class="notranslate">hist</code> function.</p>
<p dir="auto">Running this code on an ipython notebook:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from __future__ import print_function
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
%matplotlib inline

tau = 10
N = 1000
exp_fraction = 0.1
N_exp = int(N*exp_fraction)

sample = stats.expon.rvs(0, tau, size=N_exp)
print(sample.shape, sample.mean(), sample.std())
plt.hist(sample, bins=np.arange(-10, 50, 4))
sample[sample &lt; 0]"><pre class="notranslate"><code class="notranslate">from __future__ import print_function
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
%matplotlib inline

tau = 10
N = 1000
exp_fraction = 0.1
N_exp = int(N*exp_fraction)

sample = stats.expon.rvs(0, tau, size=N_exp)
print(sample.shape, sample.mean(), sample.std())
plt.hist(sample, bins=np.arange(-10, 50, 4))
sample[sample &lt; 0]
</code></pre></div>
<p dir="auto">results in the following histogram:</p>
<p dir="auto"><a href="http://i.imgur.com/vonMF5a.png" rel="nofollow">figure</a></p>
<p dir="auto">You can see the first bin (close to -10) is not exactly 0 even if <code class="notranslate">sample</code> has no negative values.</p>