title: matplotlib: plot a histogram from data
body: <p>I have data (a spectrum) that I want to plot as a histogram.
  I import the data and <code>spectrum.shape</code> shows me (1024,) as the format,
  however <code>plt.hist</code> does not plot the data correctly.
  If I use <code>plt.bar(...)</code> it works just fine, but for aesthetic reasons (I want to use the "stepfilled" histogram design) and I have to employ <code>plt.hist</code> which offers this option.
  I really don't know what to do.
  Here is my code:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  spectrum = np.loadtxt('3000.mp',  skiprows=53)
  
  y1=spectrum[:]
  num_bins = 1024
  diagram = plt.hist(y1, num_bins, alpha=0.5)
  plt.xlabel("TOF / $\mu$s")
  plt.ylabel("# ions")
  plt.show()
  </code></pre>
  
  <p>I hope for your help.</p>