title: Histogram in Python
body: <p>I have a list of numbers.The list is like [0,0,1,0,1 .... ] .Presently it has binary digits only but later on it can have decimal digits as well. I want to plot a histogram of this sequence in the list.
  When I use standard hist funcion of matplotlib library , I get only two bars.It counts all zeros and all ones and shows me the histogram with two bars. But I want to plot in a different way.
  I want a no of bars = length of list
  and 
  Height of each bar = value in the list at ( position = bar# ).</p>
  
  <p>Here is the code:</p>
  
  <pre><code> def plot_histogram(self,li_input,):
       binseq = numpy.arange(len(li_input))
       tupl = matplotlib.pyplot.hist(li_input,bins=binseq)
       matplotlib.pyplot.show()
  </code></pre>
  
  <p>li_input is the list discussed above.</p>
  
  <p>I can do it in a nasty way like :</p>
  
  <pre><code>li_input_mod = []
     for x in range(len(li_input)):
     li_input_mod += [x]*li_input[x]
  </code></pre>
  
  <p>and then plot it but i want something better.</p>