title: Python Matplotlib Hist2d with 2d array
body: <p>I want to make a 2d histogramme by putting two 2D array as argument, Tx and alt_array, same size (56000,40)</p>
  
  <pre><code>def histo_2D(alt, Tx):  
  u,v = 56000,40
  Tx = np.zeros((u,v))
  alt_array = np.zeros((u,v))
  alt,tx = np.zeros((v)), np.zeros((v))
  for i in range(0,v):
      alt[i] = i
      tx[i] = i
  alt_array[:][:] = alt 
  Tx[:][:] = tx
      alt_array[:][:] = alt 
      print np.shape(Tx), np.shape(alt_array)
      plt.hist2d(Tx , alt_array)
  </code></pre>
  
  <p>But when i try to execute my program, i get this error message :</p>
  
  <pre><code>Traceback (most recent call last):
    File "goccp.py", line 516, in &lt;module&gt;
      histo_2D(alt,Tx)
    File "goccp.py", line 376, in histo_2D
      plt.hist2d(Tx , alt_array)
    File "/Code/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py", line 2847, in hist2d
      weights=weights, cmin=cmin, cmax=cmax, **kwargs)
    File "/Code/anaconda/lib/python2.7/site-packages/matplotlib/axes.py", line 8628, in hist2d
      normed=normed, weights=weights)
    File "/Code/anaconda/lib/python2.7/site-packages/numpy/lib/twodim_base.py", line 650, in histogram2d
      hist, edges = histogramdd([x, y], bins, range, normed, weights)
    File "/Code/anaconda/lib/python2.7/site-packages/numpy/lib/function_base.py", line 288, in histogramdd
      N, D = sample.shape
  ValueError: too many values to unpack
  </code></pre>
  
  <p>I've tried to use flattened array, but the result is not really good...</p>