Hi, I have noticed some strange behavior using both ployly.js and plotly.py, and was wondering if anyone had suggestions on how I might fix it…
When I attempt to plot my particular dataset with Mesh3d, it does render the Mesh, but it also shows a few surfaces that shouldn’t be there - particularly around the edges of the plot, connecting one corner to the another.
The below images showcase this issue (generated via plotly.py) - notice the two edges highlighted and the extra planes that are created connecting the corners (mesh should follow the black dots):
I also attempted to build a similar mesh directly on Plotly online, and had better success - the link here is the working plotly online version of a similar dataset / plot.
Below is the python code and dataset I am using to generate the plot (note I am seeing the exact same issue when running plotly.js as well):
Sample Mesh Data Here (test_data_surf.spd)
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import plotly
import plotly.plotly as py
import plotly.graph_objs as go
import numpy as np
pts=np.loadtxt('test_data_surf.spd',skiprows=1)
x,y,z=zip(*pts)
trace1 = go.Mesh3d(x=x,y=y,z=z,color='90EE90',opacity=0.5,showscale=False)
trace2 = go.Scatter3d(x=x,y=y,z=z,mode='markers',marker=dict(color='rgb(0, 0, 0)',size=2,opacity=0.6))
data = [trace1,trace2]
fig = go.Figure(data=data)
plot(fig, filename="graph_py.html", auto_open=False,show_link=False)
Any suggestions on what may be causing this issue?
Thanks,
Matthew