title: Can someone explain this matplotlib pcolormesh quirk?
body: <p>Plotting an array with pcolormesh with x and y data removes a row of the data</p>
  
  <p>To illustrate what I mean, see the following:</p>
  
  <pre><code>data = np.random.random([5,5])
  plt.pcolormesh(data)
  </code></pre>
  
  <p>results in this 5x5 grid:<br>
  <a href="https://i.stack.imgur.com/hGPsu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hGPsu.png" alt="enter image description here"></a></p>
  
  <p>But if I want to define the x an y axes for the data like this, pcolormesh creates a 4x4 grid, with the top and right rows missing...  </p>
  
  <pre><code>plt.pcolormesh(range(5), range(5), data)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/xmvf0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xmvf0.png" alt="enter image description here"></a></p>
  
  <p>In order to get the full 5x5 plot, I have to do </p>
  
  <pre><code>plt.pcolormesh(range(6), range(6), data)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/cX5Da.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cX5Da.png" alt="enter image description here"></a></p>
  
  <p>Is this just a quirk of pcolormesh? Or can someone explain the reasoning why pcolormesh behaves this way?</p>