I have code in which I am trying to plot 3d data using lines. The data that I am providing is only till the black line, yet tricountour if plotting weird lines that exceed the black line and are beyond the data.
The data I am using is X, Y, Z
`
df = pd.read_csv(“Book1.csv”)
X = np.array((df["X"]))
Y = np.array((df["Y"]))
Z = np.array((df["Z"]))
countour = plt.tricontour(X/340, Y, Z, levels=[100, 200, 500, 1000])
plt.axis([0, 0.6, 0, 40.1])
plt.show()
`
Can you please advice on how to get rid of the lines exceeding the black line?
The expected output should be like the following plot: