0

I have a df with several columns, and I have a 3D plot showing three columns. I want to customize the hovering text to show z and also another column named place I have done the first part for the z, but I don’t understand how to do it for another column that is not one of the axes.

fig = go.Figure()
fig.add_trace(go.Scatter3d(x=df['X'], y=df['Y'], z=df['Z'], 
                           hovertemplate="<b><i>Z</i>: %{z:.2f}</b>" + "<br><b><i>%{text}</i>"),)
pymn
  • 171
  • 2
  • 10
  • You're going to use the argument `customdata`. [Check out these examples on Plotly's website.](https://plotly.com/python/hover-text-and-formatting/) – Kat Dec 09 '22 at 21:58

0 Answers0