I have problems with the visualization of an 3D surface. The underlaying data represents a sphere (at least partial) and comes already in 2D grids for X, Y, Z and an additional value V, which should be plotted as surface color.
Scatter plot of data points:
My first approach to plot them as a surface was
fig = go.Figure(data=[go.Surface(x=x, y=y, z=z)]) fig.show()
which gives this result:
As you can see, the surface is not calculated on the “outside” but filling up the inside. I already tried plotting the data as 3D mesh like this (x,y,z are 2d numpy arrays):
fig = go.Figure(data=[go.Mesh3d(x=x.flatten(), y=y.flatten(), z=z.flatten())]) fig.show()
resulting in this plot
I also played around with some external Delauny interpolation from the scipy package.
Is there a simple way to fix this? Maybe a simple data formatting problem?