Cannot get histogram to show separated bins with vertical lines : <p>Annoying strange problem and I have not been able to find a solution on this site yet (although the question has popped up)</p>

<p>I am trying to make a histogram where the bins have the 'bar style' where vertical lines separate each bin but no matter what I change the histtype constructor to I get a step filled histogram. </p>

<p>Here is my code. Note I am using jupyter notebook installed via anaconda with python version 2.7.6</p>

<pre><code>import numpy as np
import matplotlib.pyplot as plt

x = np.random.rand((100)) 
bins = np.linspace(0, 2, 40)
plt.title('Relative Amplitude',fontsize=30)
plt.xlabel('Random Histogram')
plt.ylabel('Frequency',fontsize=30)
plt.hist(x, bins, alpha=0.5, histtype='bar')

plt.legend(loc='upper right',fontsize=30)
plt.xticks(fontsize = 20) 
plt.yticks(fontsize = 20) 
plt.show() 
</code></pre>

<p>Thats it and I get a step filled diagram with no vertical lines separating the bars. What is annoying is that I didn't have this problem awhile ago, something clearly has changed and I don't know what.I have tried histype='barstacked' as well. Thank you kindly for your help</p>

<p><a href="https://i.stack.imgur.com/yh3AI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yh3AI.png" alt="enter image description here"></a>   </p>
