title: Creating Density/Heatmap Plot from Coordinates and Magnitude in Python
body: <p>I have some data which is the number of readings at each point on a 5x10 grid, which is in the format of;</p>
  <pre><code>X = [1, 2, 3, 4,..., 5]
  Y = [1, 1, 1, 1,...,10]
  Z = [9,8,14,0,89,...,0]
  </code></pre>
  <p>I would like to plot this as a heatmap/density map from above, but all of the <code>matplotlib</code> graphs (incl. contourf) that I have found are requiring a 2D array for Z and I don't understand why.</p>
  <p>EDIT;</p>
  <p>I have now collected the actual coordinates that I want to plot which are not as regular as what I have above they are;</p>
  <pre><code>X = [8,7,7,7,8,8,8,9,9.5,9.5,9.5,11,11,11,10.5,
       10.5,10.5,10.5,9,9,8, 8,8,8,6.5,6.5,1,2.5,4.5,
       4.5,2,2,2,3,3,3,4,4.5,4.5,4.5,4.5,3.5,2.5,2.5,
       1,1,1,2,2,2]
  
  Y = [5.5,7.5,8,9,9,8,7.5,6,6.5,8,9,9,8,6.5,5.5,
        5,3.5,2,2,1,2,3.5,5,1,1,2,4.5,4.5,4.5,4,3,
        2,1,1,2,3,4.5,3.5,2.5,1.5,1,5.5,5.5,6,7,8,9,
        9,8,7]
  
  z = [286,257,75,38,785,3074,1878,1212,2501,1518,419,33,
       3343,1808,3233,5943,10511,3593,1086,139,565,61,61,
       189,155,105,120,225,682,416,30632,2035,165,6777,
       7223,465,2510,7128,2296,1659,1358,204,295,854,7838,
       122,5206,6516,221,282]
  </code></pre>
  <p>From what I understand you can't use floats in a <code>np.array</code> so I have tried to multiply all values by 10 so that they are all integers, but I am still running into some issues. Am I trying to do something that will not work?</p>