title: Plotting histogram in python
body: <p>I wrote the following program in python to obtain equi-width histograms. But when I am plotting it I am getting a single line in figure instead of a histogram. Can someone please help me figure out as to where am I going wrong.</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  for num in range(0,5):
      hist, bin_edges = np.histogram([1000, 98,99992,8474,95757,958574,97363,97463,1,4,5], bins = 5)
      plt.bar(bin_edges[:-1], hist, width = 1000)
      plt.xlim(min(bin_edges), max(bin_edges))
      plt.show()   
  </code></pre>
  
  <p>Additionally I want to label each plot obtained with its "num" value..which range from 0 to 5. In the example given above although I have kept my data constant, but I intend to change my data for different "num" values.</p>