Hello
I am building a surface from a list of points using
def surface(grid,metodo): #metodo='linear', 'cubic' o 'nearest'
tx=grid[0]
ty=grid[1]
tz=grid[2]
X = np.linspace(min(tx), max(tx))
Y = np.linspace(min(ty), max(ty))
X, Y = np.meshgrid(X, Y) # 2D grid for interpolation
Z = griddata((tx,ty),tz,(X,Y),
method=metodo)
return [tx,ty,tz,X,Y,Z]
Then given a list of points L, I define sL=surface(L,βlinearβ) and the figure
fig=go.Figure()
fig.add_trace(go.Surface( x=sL[3],y=sL[4],z=sL[5],
colorscale='brwnyl',
opacity = 1,
name='surface',
legendgroup='surface',
showlegend=True,
showscale=False))
fig.update_layout(
scene = dict(
xaxis=dict(title='X',
tickfont = dict(size = 10,color = 'black'),
title_font_size=10,
titlefont_color='black',
backgroundcolor='white',
color='black',
gridcolor='gray'),
yaxis=dict(title='Y',
tickfont = dict(size = 10,color = 'black'),
title_font_size=10,
titlefont_color='black',
backgroundcolor='white',
color='black',
gridcolor='gray'),
zaxis=dict(nticks=4,
tickfont = dict(size = 10,color = 'black'),
title='Z',
title_font_size=10,
titlefont_color='black',
range=[100,600],
backgroundcolor='white',
color='black',
gridcolor='gray'),
aspectratio=dict(x=2, y=2, z=0.5)),
#aspectmode='data'),
scene_camera= camera
)
fig.show()
and the result is
How can I avoid the serrated edge?
Thanks