How can I add a hoverinfo within a 3D scatter plot, so that it displays the index of the particular 3D [x,y,z] coordinate? The hoverinfo seems to only like " - Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters"
I stored the indices of each xyz point in an array. Is there a way to incorporate it into the plot?
You could set the
hovertext property (See https://plot.ly/python/reference/#scatter3d-hovertext) to an array of the the point indices (I think a list of numbers should work fine, but if you run into a problem then try converting it to a list of strings). Then make sure the
Hope that helps!
Thank you! Hovertext did the trick. I just have to figure out how to display the element of my array corresponding to the particular point over which the cursor is hovering. Right now it’s displaying the whole array.
Are you passing a list of numbers as
hovertext? That seems to work for me,