(Asking same question again as it was marked duplicate but I couldn't resolve it with suggested solution) I am new to python and trying to plot a contour graph. I got the expected results but want to remove levels=0 from my graph. Please help. Here's my code:
import numpy as np
from scipy.interpolate import Rbf
import matplotlib.pyplot as plt
df = (
spark.read.csv('/home/Downloads/test1.csv', header=True, inferSchema=False, sep='|')
.withColumn('x', expr("cast(Width as double)"))
.withColumn('y', expr("cast(Length as double)"))
.withColumn('z', expr("cast(Depth as double)"))
)
data = df.toPandas()
# Interpolate these onto a regular grid
xi, yi = np.meshgrid(data.x, data.y)
func = Rbf(data.x, data.y, data.z, function='linear')
zi = func(xi, yi)
# plt.contour(xi, np.flip(yi), zi)
qwe = plt.contour(xi, yi, zi)
plt.colorbar()
Here's the picture of my current output.(yellow lines are the one that i want to remove) Plot pic