I have 3 1-D ndarrays: x, y, z
and the following code:
import numpy as np import matplotlib.pyplot as plt import scipy.interpolate as spinterp ## de
Note that the explicit masking is no longer necessary in matplotlib master as arrays are now masked automatically internally. Will be incorporated into matplotlib >2.1. See my merged pull request https://github.com/matplotlib/matplotlib/pull/5451
So now it's as simple as
plt.pcolormesh(X,Y,Z.T)