Using a dataframe for contour plots

I have a dataframe with x, y z values, but I am unsure how I can convert the values into the z structure for a contour plot.

Can someone please provide a reference or direction on how to make this?

thanks

1 Like
import plotly.express as px
import pandas as pd

df = pd.read_excel('D:/..../Data.xls')

fig = px.density_contour(df, x="Thickness", y="PreHeat")
fig.update_traces(contours_coloring="fill", contours_showlabels = True)
fig.show()

Is there any chart related to the Contour plot, that show a contour plot, where X and Y are variables and Z ist a target variable?

The same plot as here: https://support.minitab.com/en-us/minitab/19/help-and-how-to/graphs/contour-plot/key-results/