HoverInfo index of an [x,y,z] point on a 3D scatter plot

Hi,
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?
Thanks.

-Misha.

Hi @mischki,

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 hoverinfo includes 'text'

Hope that helps!

-Jon

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,
-Jon