title: MemoryError when running Numpy Meshgrid
body: <p>I have <strong>8823</strong> data points with x,y coordinates. I'm trying to follow the answer on <a href="https://stackoverflow.com/questions/2369492/generate-a-heatmap-in-matplotlib-using-a-scatter-data-set">how to get a scatter dataset to be represented as a heatmap</a> but when I go through the </p>
  
  <p><code>X, Y = np.meshgrid(x, y)</code> </p>
  
  <p>instruction with my data arrays I get <code>MemoryError</code>. I am new to numpy and matplotlib and am essentially trying to run this by adapting the examples I can find.</p>
  
  <p>Here's how I built my arrays from a file that has them stored:</p>
  
  <pre><code>XY_File = open ('XY_Output.txt', 'r')
  XY = XY_File.readlines()
  XY_File.close()
  
  Xf=[]
  Yf=[]
  for line in XY:
      Xf.append(float(line.split('\t')[0]))
      Yf.append(float(line.split('\t')[1]))
  x=array(Xf)
  y=array(Yf)
  </code></pre>
  
  <p>Is there a problem with my arrays? This same code worked when put into <a href="http://matplotlib.sourceforge.net/examples/pylab_examples/hexbin_demo.html" rel="nofollow noreferrer">this example</a> but I'm not too sure.</p>
  
  <p>Why am I getting this MemoryError and how can I fix this?</p>