title: Matplotlib heatmap with changing y-values
body: <p>I'm trying to plot some data for a measurement taken from between two surfaces. The z-direction in the system is defined as normal to the surfaces. The problem is that along the x-axis of my plot I'm varying the separation distance between the two surfaces which means that for every slice, the min/max of the y-axis change. I've sort circumvented this by presenting a normalized y-axis where z_min is the bottom surface and z_max is the top surface:
  <img src="https://i.imgur.com/XhzlM7S.png" alt="enter image description here"></p>
  
  <p>However, this representation somewhat distorts the data. Ideally I would like to show the actual distance to the wall on the y-axis and just leave the areas outside of the system bounds white. I (poorly) sketched what I'm envisioning here (the actual distribution on the heatmap should look different, of course):
  <img src="https://i.imgur.com/3Ysu3WB.png" alt="enter image description here"></p>
  
  <p>I can pretty easily plot what I want as a 3D scatter plot like so:
  <img src="https://i.imgur.com/nyby7zg.png" alt="enter image description here"></p>
  
  <h2>But how do I get the data into a plot-able form for a heatmap?</h2>
  
  <p>I'm guessing I would have to blow up the MxN array and fill in missing values through interpolation or simply mark them as NAN? But then I'm also not quite sure how to add a hard cutoff to my color scheme to make everything outside of the system white.</p>