@joe_ths
With such a definition of the Mesh3d contours:
fig = go.Figure(go.Mesh3d(x=x,
y=y,
z=z,
i=I,
j=J,
k=K,
contour_width=2, contour_color="#101010", contour_show=True,
intensity=z,
colorscale="curl"
))
fig.update_traces(lighting=dict(ambient=0.8, diffuse=0.5,
specular=0.5, roughness=0.5,
fresnel=0.5))
the contours are displayed only on hover over a point. In fact it displays only the contour through the hovered point.
For meshes is recommended
to plot the triangle edges, to visualize the underlaying triangulation.
Namely:
if
vertices
is the array of 3d points, of shape (n, 3),
and
faces
is the array representing triangles (an array of shape (m,3) and type int),
then you can define the trace of triangle edges as follows:
tri_vertices= vertices[faces]
Xe = []
Ye = []
Ze = []
for T in tri_vertices:
Xe += [T[k%3][0] for k in range(4)]+[ None]
Ye += [T[k%3][1] for k in range(4)]+[ None]
Ze += [T[k%3][2] for k in range(4)]+[ None]
#define the lines to be plotted
lines= go.Scatter3d(
x=Xe,
y=Ye,
z=Ze,
mode='lines',
name='',
line=dict(color= 'rgb(50,50,50)', width=1.5))