title: TypeError: 'float' object is not subscriptable When trying to make a histogram in matplotlib
body: <p>When I try and run the following code </p>
  
  <pre><code>import matplotlib.pyplot as plt
  import math
  import numpy as np
  from numpy.random import normal
  
  masses = []
  
  f = open( 'myfile.txt','r')
  f.readline()
  for line in f:
     if line != ' ':      
     line = line.strip()    # Strips end of line character 
  
     columns = line.split() # Splits into coloumn 
     mass = columns[8]      # Column which contains mass values
     mass = float(mass)
     masses.append(mass)
     mass = math.log10(mass)
     #print(mass)
  
  
  #gaussian_numbers = #normal(size=1000)
  plt.hist(mass, bins = 50, normed = True)
  plt.title("Gaussian Histogram")
  plt.xlabel("Value")
  plt.ylabel("Frequency")
  plt.show()
  </code></pre>
  
  <p>I get this error </p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Documents and Settings\Khary\My Documents\Python\HALOMASS_READER_PLOTTER.py",  line 23, in &lt;module&gt;
  plt.hist(mass, bins = 50, normed = True)
    File "C:\Python32\lib\site-packages\matplotlib\pyplot.py", line 2191, in hist
  ret = ax.hist(x, bins, range, normed, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, **kwargs)
  File "C:\Python32\lib\site-packages\matplotlib\axes.py", line 7606, in hist
  if isinstance(x, np.ndarray) or not iterable(x[0]):
  TypeError: 'float' object is not subscriptable 
  </code></pre>
  
  <p>Can one not use floats when doing histograms or am I missing something else? Any and all help would be appreciated.</p>