Hi. I would like to use plotly.graph_object.Figure to show a custom-created 3D Mesh as seen at https://plotly.com/python/3d-mesh/
However, I would like to hide the XYZ Axis planes and just show the mesh by itself. Is there a way to do so? Code snippet in python would be much appreciated. Thank you
Hey @wassimj ,
Welcome to the community.
import plotly.graph_objects as go
import numpy as np
# Download data set from plotly repo
pts = np.loadtxt(np.DataSource().open('https://raw.githubusercontent.com/plotly/datasets/master/mesh_dataset.txt'))
x, y, z = pts.T
fig = go.Figure(data=[go.Mesh3d(x=x, y=y, z=z, color='lightpink', opacity=0.50)])
fig.update_layout(
scene = dict(
xaxis = dict(visible=False),
yaxis = dict(visible=False),
zaxis =dict(visible=False)
)
)
fig.show()
Also please see link below:
https://plotly.com/python/3d-axes/
Have a nice day.
2 Likes
Brilliant! Many thanks!
1 Like
Sorry, one more question. Is there a way to emphasize (e.g. draw in a darker colour) the edges of this mesh?
Please see the docs:
Have a nice day.
1 Like
Thank you. Please see the result here: https://wassimj-topologicst-plotly-test01-yul95o.streamlitapp.com/
1 Like