title: How to plot a density map in python?
body: <p>I have a .txt file containing the x,y values of regularly spaced points in a 2D map, the 3rd coordinate being the density at that point.</p>
  
  <pre><code>4.882812500000000E-004  4.882812500000000E-004  0.9072267
  1.464843750000000E-003  4.882812500000000E-004   1.405174
  2.441406250000000E-003  4.882812500000000E-004   24.32851
  3.417968750000000E-003  4.882812500000000E-004   101.4136
  4.394531250000000E-003  4.882812500000000E-004   199.1388
  5.371093750000000E-003  4.882812500000000E-004   1278.898
  6.347656250000000E-003  4.882812500000000E-004   1636.955
  7.324218750000000E-003  4.882812500000000E-004   1504.590
  8.300781250000000E-003  4.882812500000000E-004   814.6337
  9.277343750000000E-003  4.882812500000000E-004   273.8610
  </code></pre>
  
  <p>When I plot this density map in gnuplot, with the following commands:</p>
  
  <pre><code>set palette rgbformulae 34,35,0
  set size square
  set pm3d map
  splot "dens_map.map" u 1:2:(log10($3+10.)) title "Density map"`
  </code></pre>
  
  <p>Which gives me this beautiful image: </p>
  
  <p><img src="https://i.stack.imgur.com/AZsBO.jpg" alt="enter image description here"></p>
  
  <p>Now I would like to have the same result with matplotlib. </p>