This is best done before converting the data into a grid shape:
>>> x = [0,4,17] >>> y = [-7,25,116] >>> z = [50,112,47] >> data = np.column_stack([x, y, z]) array([[ 0, -7, 50], [ 4, 25, 112], # <<---------------- Keep this [ 17, 116, 47]]) >>> data = data[data[:,2] == 112] # points with z==112 array([[ 4, 25, 112]])
then you can convert the data for plotting using griddata or, for example, the function specified here :
X, Y, Z = grid(data[0], data[1], data[2])
elyase
source share