Change axis titles in fig.add_scatter3d

fig.add_scatter3d(x=[fig[‘data’][0][‘x’][index_knee_angle]], y=[fig[‘data’][0][‘y’][index_knee_angle]],
z=[fig[‘data’][0][‘z’][index_knee_angle]], mode=‘markers’,
marker_symbol=‘diamond’, marker_size=6,
marker=dict(color=‘green’), showlegend=True,
name=‘Knee
Point’)

The add points did not the original axis titles, but shown as x:, y:, z:, how to change that?

plot

Hi @irecsys,

You can change the hovertemplate.

Example:

import numpy as np
import plotly.graph_objects as go

# prepare data
data_points = 10
x = np.arange(data_points)
y = np.arange(data_points)
z = np.arange(data_points)


#create figure
fig = go.Figure(
    go.Scatter3d(
        x=x, 
        y=y, 
        z=z, 
        hovertemplate='<b>Your x label</b>: %{x}<br><b>Your y label</b>: %{y}<br><b>Your z label</b>: %{z}<br>'
    )
)
fig.show()

mrep hovertemplate