title: How can I set dataless areas of a hist2d plot to the zero-value color?
body: <p>I'm tracking a subject's gaze over a specified area of a computer screen.  I'm constructing gaze heatmaps using pyplot's <code>hist2d</code> function.</p>
  
  <p>Here's a simple example:</p>
  
  <pre><code>figure()
  hist2d(xval, yval, bins=1000)
  xlim([-6, 6])
  ylim([-4.5, 4.5])
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/KKbdf.png" alt="enter image description here"></p>
  
  <p>As you can see, there is a significant area outside of the range of my data.  However, I would like to set this area to the blue indicative of a zero-value.</p>
  
  <p>My first attempt using <code>imshow</code> can be seen here:</p>
  
  <pre><code>figure()
  imshow(np.array([[0] * 8] * 12), extent=[-6, 6, -4.5, 4.5])
  hist2d(xval, yval, bins=1000)
  xlim([-6, 6])
  ylim([-4.5, 4.5])
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/OIyzO.png" alt="enter image description here"></p>
  
  <p>This sort of works, but leaves an ugly vertical line at the boundary of my data's range.</p>
  
  <p><strong>My questions are as follows:</strong></p>
  
  <ol>
  <li>Is there a way to fill the figure with the zero-value blue while avoiding the <code>imshow</code> call</li>
  <li>If not, how can I hide the vertical line?</li>
  </ol>