title: Matlab - Creating a heatmap to visualize density of 2D point data
body: <p>Given a N x N array I want to generate a heat map that visualizes data in such a way:</p>
  
  <p><a href="https://i.stack.imgur.com/kae8P.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kae8P.png" alt="enter image description here"></a></p>
  
  <p>Given the source image below I created a sparsely populated N X N array that contained the points listed below. 90 points in a 1000x800 array. </p>
  
  <p><a href="https://i.stack.imgur.com/mG8Df.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/mG8Df.jpg" alt="enter image description here"></a></p>
  
  <p>When researching online how to generate such a heatmap I stumbled on using colormap only to get disappointing results.</p>
  
  <pre><code>colormap('hot');   % set colormap
  imagesc(points);        % draw image and scale colormap to values range
  colorbar;  
  </code></pre>
  
  <p>I got rather disappointing results.</p>
  
  <p><a href="https://i.stack.imgur.com/T3iVg.png" rel="noreferrer"><img src="https://i.stack.imgur.com/T3iVg.png" alt="enter image description here"></a></p>
  
  <p>What other alternatives do I have to make my image above resemble the top one?</p>