1

I have created a mesh 3d figure in plotly

import plotly.graph_objects as go

fig = go.Figure(data=[
    go.Mesh3d(
        x=[0, 1, 0, 0],
        y=[0, 0, 1, 0],
        z=[0, 0, 0, 1],
        i=[0, 0, 0, 1],
        j=[1, 2, 3, 2],
        k=[2, 3, 1, 3],
    )
])

fig.show()

enter image description here

How can I highlight the xyz-points? So that it looks like the following:

enter image description here

Flavia Giammarino
  • 7,987
  • 11
  • 30
  • 40
Raphael
  • 673
  • 1
  • 9
  • 27

1 Answers1

1

I referred to @rpanai's answer from How to add data (or single point) to an existing 3d scatter plotly exprees plot in python.


You can use the following code before fig.show() to get x-y-z points:

fig.add_trace(
    go.Scatter3d(x=[0, 1, 0, 0],
                 y=[0, 0, 1, 0],
                 z=[0, 0, 0, 1],
                 mode='markers')
)
medium-dimensional
  • 1,974
  • 10
  • 19