Plotting an array with pcolormesh with x and y data removes a row of the data
To illustrate what I mean, see the following:
data = np.random.random([5,5]) plt.pcolormesh(data)
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...
plt.pcolormesh(range(5), range(5), data)
In order to get the full 5x5 plot, I have to do
plt.pcolormesh(range(6), range(6), data)
Is this just a quirk of pcolormesh? Or can someone explain the reasoning why pcolormesh behaves this way?