plotly.py: Hover info broken in 3D scatter plot with opacity 1

Hi, in 3D scatter when marker opacity is set to 1 and when you hover over any point only one hover label is shown. Specifically it is the label belonging to the first point in data. See for yourself:

x, y, z = np.random.multivariate_normal(np.array([0,0,0]), np.eye(3), 200).transpose()
trace1 = go.Scatter3d(
    x=x,
    y=y,
    z=z,
    mode='markers',
    marker=dict(
        size=12,
        line=dict(
            color='rgba(217, 217, 217, 0.14)',
            width=0.5
        ),
        opacity=1
    )
)

data = [trace1]
layout = go.Layout(
    margin=dict(
        l=0,
        r=0,
        b=0,
        t=0
    )
)
fig = go.Figure(data=data, layout=layout)
plotly.offline.iplot(fig)

scatter plot

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Thank you @archmoj ! I can confirm the issue is gone in plotly for python v. 3.5.0 on Ubuntu.

I fixed this provisionally by adding this fake trace to the beginning of the list: go.Scatter3d(x=[0], y=[0], z=[0], marker={'color':'rgb(0, 0, 0)', 'opacity': 1, 'size': 0.1}, showlegend=False).